WAMP 上 phpThumb 的配置问题
我无法让 phpThumb 在 WAMP 上生成缩略图。 问题似乎是源图像的路径构建不正确,如以下调试信息所示:
调试 phpThumb:ResolveFilenameToAbsolute() 前置 $this->config_document_root (C:\Projects\WordPressTest\Site\wp-content\plugins\yet-another-photoblog) 到$文件名 (/wordpresstest/wp-content/uploads/2009/02/valentine-2-010.jpg) 导致 ($AbsoluteFilename = “C:\Projects\WordPressTest\Site\wp-content\plugins\yet-another-photoblog/wordpresstest/wp-content/uploads/2009/02/valentine-2-010.jpg”) 在文件“phpthumb.class.php”第 1023 行
行正确的路径是:
C:\Projects\WordPressTest\Site\wp-content\uploads\2009\02\valentine-2-010.jpg
我怀疑这与phpThumb的配置有关。 有人可以帮忙吗?
谢谢,
尼克
I'm having trouble getting phpThumb to generate thumbnails on WAMP. The problem seems to be that the path to the source image is be being constructed incorrectly, as indicated by this debug info:
DEBUG phpThumb: ResolveFilenameToAbsolute() prepending
$this->config_document_root
(C:\Projects\WordPressTest\Site\wp-content\plugins\yet-another-photoblog)
to $filename
(/wordpresstest/wp-content/uploads/2009/02/valentine-2-010.jpg)
resulting in ($AbsoluteFilename =
"C:\Projects\WordPressTest\Site\wp-content\plugins\yet-another-photoblog/wordpresstest/wp-content/uploads/2009/02/valentine-2-010.jpg")
in file "phpthumb.class.php" on line 1023
The correct path would be:
C:\Projects\WordPressTest\Site\wp-content\uploads\2009\02\valentine-2-010.jpg
I suspect it's something to do with the configuration of phpThumb. Can anyone help?
Thanks,
Nick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
显然 phpThumb 不喜欢在 Windows 上以别名运行。 为了解决这个问题,我在文档根目录中运行了我的网站。
Apperently phpThumb doesn't like running under an alias on Windows. To get round it I ran my site in the document root instead.
我在项目中经历过类似的事情,并找到了使用所有 '/' -vs- '\' 的解决方案
(我不知道为什么或如何......但解决了我的问题)
I have experienced something similar with a project and found resolution in using all '/' -vs- '\'
(I don't know why or how... but fixed my issue)