dtdt0454 2016-09-11 15:46
浏览 57

递归读取文件夹中的名称文件,然后在html文件中创建新的拇指

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 -->
    </a>
   </div>
   <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  -->
     </a>
     </div>
</div>

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!

Stef

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
    • ¥50 成都蓉城足球俱乐部小程序抢票
    • ¥15 yolov7训练自己的数据集
    • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
    • ¥15 电力市场出清matlab yalmip kkt 双层优化问题