WAMP 上 phpThumb 的配置问题

发布于 2024-07-14 01:01:24 字数 735 浏览 6 评论 0原文

我无法让 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南…巷孤猫 2024-07-21 01:01:24

显然 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.

冰魂雪魄 2024-07-21 01:01:24

我在项目中经历过类似的事情,并找到了使用所有 '/' -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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文