帖子中怎么会显示PHP标签代码
1个回答
2014-12-28
展开全部
修正方法:
1.打开viewthread.php
查找$postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
复制代码改为 $postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
$postlist[$firstpid]['message'] = preg_replace('#(.*)#siUe', "'\\1'", $postlist[$firstpid]['message']);
复制代码2.打开include/discuzcode.func.php
查找$message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
复制代码改为$message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
$message = preg_replace('#(.*)#siU', "\\1", $message);
复制代码查找global $_DCACHE;
if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
unset($_DCACHE['tags'][$key]);
}
} else {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
}
复制代码改为global $_DCACHE;
if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
unset($_DCACHE['tags'][$key]);
}
} else {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
}
1.打开viewthread.php
查找$postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
复制代码改为 $postlist[$firstpid]['message'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$_DCACHE[tags], '\\1')", $postlist[$firstpid]['message']);
$postlist[$firstpid]['message'] = preg_replace('#(.*)#siUe', "'\\1'", $postlist[$firstpid]['message']);
复制代码2.打开include/discuzcode.func.php
查找$message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
复制代码改为$message = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', "highlight('\\2', \$highlightarray, '\\1', 0)", $message);
$message = preg_replace('#(.*)#siU', "\\1", $message);
复制代码查找global $_DCACHE;
if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
unset($_DCACHE['tags'][$key]);
}
} else {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
}
复制代码改为global $_DCACHE;
if($_DCACHE['tags'][$key] && @strexists($text, $replaceword)) {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
unset($_DCACHE['tags'][$key]);
}
} else {
$text = str_replace($replaceword, ''.$replaceword.'', $text);
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询