首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >timthumb缓存镜像路径

timthumb缓存镜像路径
EN

Stack Overflow用户
提问于 2012-06-21 09:09:21
回答 1查看 2.2K关注 0票数 0

我将缓存设置为TRUE,我的缓存文件夹现在甚至设置为777。

但是当我查看图像路径时,它仍然显示原始文件的文件名和路径吗?

它不应该向我显示缓存图像的路径吗?

Timthumb设置:

代码语言:javascript
复制
define ('CACHE_SIZE', 100);             // number of files to store before clearing cache
define ('CACHE_CLEAR', 20);                 // maximum number of files to delete on each cache clear
define ('CACHE_USE', TRUE);                 // use the cache files? (mostly for testing)
define ('VERSION', '1.25');                 // version number (to force a cache refresh)
define ('DIRECTORY_CACHE', '../cache');     // cache directory
define ('MAX_WIDTH', 5000);                 // maximum image width
define ('MAX_HEIGHT', 3000);                // maximum image height
define ('ALLOW_EXTERNAL', FALSE);           // allow external website (override security precaution - not advised!)
define ('MEMORY_LIMIT', '128M');                // set PHP memory limit
define ('MAX_FILE_SIZE', 12582912);         // file size limit to prevent possible DOS attacks (roughly 12 megabytes)
define ('CURL_TIMEOUT', 10);                    // timeout duration. Tweak as you require (lower = better)

im的问题是url图像路径是这样的:

代码语言:javascript
复制
http://mydomain.com/includes/crop.php?src=images/art/urban/alleyway.jpg&h=250&w=958&q=95

我想在启用缓存的情况下应该是这样的:

代码语言:javascript
复制
http://mydomain.com/cache/a051f7c9e5d039708ac92dece9a07901.jpg

如果我做错了什么,请告诉我。

干杯约翰

EN

回答 1

Stack Overflow用户

发布于 2012-09-25 18:24:35

据我所知,TimThumb仍将运行PHP处理,以至少评估是否存在拇指。所以不,它在你的img上应该仍然有相同的src。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11130317

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档