0

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

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

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

Timthumb 设置:

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)

我遇到的问题是 url 图像路径是这样的:

http://mydomain.com/includes/crop.php?src=images/art/urban/alleyway.jpg&h=250&w=958&q=95

我认为启用缓存会是这样的:

http://mydomain.com/cache/a051f7c9e5d039708ac92dece9a07901.jpg

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

干杯约翰

4

1 回答 1

1

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

于 2012-09-25T10:24:35.423 回答