找到include/arc.archives.class.php在里面需要修改两次地方
在1230行
// 这里可能会有错误 if (version_compare(PHP_VERSION, '5.5.0', '>=')) { $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); } else { $body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); } //恢复超链接 $body = preg_replace("#(<a(.*))-\]-(.*)-\[-(\/a>)#isU", '\\1>\\3<\\4', $body); return $body;
改成
if (version_compare(PHP_VERSION, '7.5.0', '>=')) { $body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); } else { $body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); } //恢复超链接 $body = preg_replace("#(<a(.*))-\]-(.*)-\[-(\/a>)#isU", '\\1>\\3<\\4', $body); return $body;
只需要把 PHP_VERSION, ‘5.5.0’, ‘>=’ 里面的第一个5改成7 就ok了还有1250行也是一样的。
以上就是dedecms文章关键字(自动内链)php5.5以上urf-8版本失效的解决方法的详细内容,更多关于dedecms文章关键字内链失效问题的资料请关注苹果cms教程其它相关文章!
Hi, this is a comment. To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard. Commenter avatars come from Gravatar.