tidy_parse_string 需要 1 个参数,给定 2 个参数

发布于 2024-08-23 19:11:26 字数 591 浏览 6 评论 0原文

我在我的家用计算机上使用 PHP 5.2.11 (Windows - WAMP) 有 HTML tidy 扩展,我用它来清理 HTML:

$data = tidy_parse_string($data, array(
   'clean'  => TRUE,
   'indent'  => 0,
   'output-xhtml' => true,
   'wrap'  => 7000,
   ));

这在我的家用计算机上工作得很好,但在运行网站的实际服务器上 (LAMP) ,我收到错误:

tidy_parse_string expects exactly 1 parameter, 2 given in....

本地计算机上的 phpinfo() 给出了版本号:

2.0 ($Id: tidy.c 272374 2008-12-31 11:17:49Z sebastian $) 

但是服务器上的 phpinfo() 没有给出版本号。如果我无法获得接受配置的 *nix 版本(为什么不能?),那么如何将这些配置变量传递给 tidy?

I have HTML tidy extension on my home computer using PHP 5.2.11 (Windows - WAMP), and I use this to clean up HTML:

$data = tidy_parse_string($data, array(
   'clean'  => TRUE,
   'indent'  => 0,
   'output-xhtml' => true,
   'wrap'  => 7000,
   ));

This works great on my home machine, but on the actual server on which the website runs (LAMP), I get the error:

tidy_parse_string expects exactly 1 parameter, 2 given in....

The phpinfo() on my local machine gives a version number:

2.0 ($Id: tidy.c 272374 2008-12-31 11:17:49Z sebastian $) 

But the phpinfo() on the server does not give a version. If I can't get a *nix version that accepts configuration (why on earth can't it?), then how do I pass these config vars to tidy?

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

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

发布评论

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

评论(1

莫相离 2024-08-30 19:11:26

听起来您正在运行旧版本的 Tidy PECL 扩展。尝试更新它:

pecl update-channels
pecl upgrade

这应该可以纠正它,希望有帮助!

Sounds like you're running an old version of the Tidy PECL extension. Try updating it:

pecl update-channels
pecl upgrade

That should correct it, hope it helps!

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