tidy_parse_string 需要 1 个参数,给定 2 个参数
我在我的家用计算机上使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您正在运行旧版本的 Tidy PECL 扩展。尝试更新它:
这应该可以纠正它,希望有帮助!
Sounds like you're running an old version of the Tidy PECL extension. Try updating it:
That should correct it, hope it helps!