doujinyi1267 2009-10-01 23:59
浏览 11
已采纳

从图像文件夹创建虚拟的独特图像集

I have a folder full of 2000 images, all unique and named like this:

/images/0001.jpg (... 2000.jpg)

I need to be able to access 100 random, unique images. Something like this:

/sets/0001/001.jpg (... 100.jpg)

I need hundreds of "sets of unique images" like this.

I made one example set using a folder and a htaccess file with 100 lines like this:

Redirect 303 /sets/1234/001.jpg /images/0432.jpg
Redirect 303 /sets/1234/002.jpg /images/0391.jpg
...

How would this be done the easiest way without actually creating hundreds of folders and corresponding htaccess files?

Thanks a lot!

  • 写回答

2条回答 默认 最新

  • doujiushi9007 2009-10-02 00:04
    关注

    Use a rewrite rule to direct /sets/*/*.jpg to a php script and have that file serve the images from the images folder. Store the already sent images in that set in a session so that you can make sure the image being sent in the current request is unique.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 求螺旋焊缝的图像处理
  • ¥15 blast算法(相关搜索:数据库)
  • ¥15 请问有人会紧聚焦相关的matlab知识嘛?
  • ¥15 网络通信安全解决方案
  • ¥50 yalmip+Gurobi
  • ¥20 win10修改放大文本以及缩放与布局后蓝屏无法正常进入桌面
  • ¥15 itunes恢复数据最后一步发生错误
  • ¥15 关于#windows#的问题:2024年5月15日的win11更新后资源管理器没有地址栏了顶部的地址栏和文件搜索都消失了
  • ¥100 H5网页如何调用微信扫一扫功能?
  • ¥15 讲解电路图,付费求解