2016-09-11 15:46
浏览 56


I'm very new to html, php and js so maybe this could seem a dumb question... please help anyway :)

This is the scenario:

  • I have a folder that contains some image files.
  • I have a html page were I want to display those files.

I'd like not to manually repeat the same command for each image, but to have something tha does it for me.

In my html there is something like this:

<div class="portfolio">
  <div class="pick-my-image">
    <a href="cool_bag.html" class="thumb-overlay"> <!-- html page should be created automatically -->
      <img src="myfolder/cool_bag.jpg"> <!-- this file name should be picked up automatically -->
   <div class="portfolio-description">
     <a href="cool_bag.html">
       <h6>Cool things</h6>
       <h5 class="portfolio-name" ><strong>Cool bag</strong></h5><!-- This should be the name of the image. Actually I don't know how to generate it  -->

This code generates a thumbnail in a portfolio gallery page. Every thumbnail, if clicked, should redirect to its page (cool_bag.html in this case)

Thanks to all that will answer!


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答