HTMLPurifier 配置错误
我正在尝试为 HTMLPurifier 设置一些配置,并且一切都在我的开发计算机上运行,但在测试中,它失败了。
出现错误“未找到 HTMLPurifier_config”类。 但如果我删除配置,它运行就没有问题。 我正在使用 HTMLPurifier 4.0.0
$config=HTMLPurifier_config::createDefault();
$config->set('AutoFormat','AutoParagraph', true);
$config->set('AutoFormat','Linkify', true);
$purifier = new HTMLPurifier($config);
我正在使用 HTMLPurifier.auto.php 加载 HTMLPurifier,但正如我所说,这在开发中有效,但在测试中无效。
I'm trying to set some configurations for HTMLPurifier, and everything works on my dev machine, but on test, it fails.
with the error Class 'HTMLPurifier_config' not found.
but if I remove config, it runs no problem.
I'm using HTMLPurifier 4.0.0
$config=HTMLPurifier_config::createDefault();
$config->set('AutoFormat','AutoParagraph', true);
$config->set('AutoFormat','Linkify', true);
$purifier = new HTMLPurifier($config);
I am loading HTMLPurifier with HTMLPurifier.auto.php, but as I said, this is working in dev, but not testing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
config 需要大写。
config needs to be capitalized.