Tidy 返回空字符串

发布于 2024-08-22 19:48:54 字数 357 浏览 2 评论 0原文

在我的本地服务器上,这工作正常。但是,当我尝试在生产服务器上执行此操作时,以下内容返回一个空字符串:

$tidy = new tidy();
$tidy->repairString($html);

$html 在修复之前具有实际的 HTML 内容(我检查过),但 repairString 返回一个空字符串。这是否表明配置错误? libtidy 没有正确安装吗?我该如何调试这个特定问题?

编辑:查看评论。我找到了一个非常简单的方法来删除 Tidy 依赖,所以这个问题不再需要紧急答案。即便如此,我还是把它留下来供参考。

On my local server, this works fine. However, when I try to do this on the production server, the following returns an empty string:

$tidy = new tidy();
$tidy->repairString($html);

$html has actual HTML content before repairing (I checked), but repairString returns an empty string. Does this indicate a configuration error? Is libtidy not properly installed? How can I go about debugging this particular issue?

EDIT: See comments. I've found a very simple way to remove the Tidy dependency, so this question no longer needs an urgent answer. Even so, I'll leave it up for reference.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

も星光 2024-08-29 19:48:54

我意识到我实际上并不真正需要 Tidy,所以我删除了依赖项。这对我来说已经足够了。

即便如此,这个问题仍然值得参考。

I realized that I don't actually really need Tidy, so I removed the dependency. That was a sufficient answer for me.

Even so, this question remains up for reference.

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