如何在没有代码翻译的情况下对数据库进行评论?

时间:2015-02-21 02:36:44

标签: php view

eksample: 我想建立一个数据库,管理员可以在网页上发布“带代码的新闻文章”,代码无法翻译。

所以,有人发帖;

if (!isset($_GET['underside'])){
 include ('front.inc.php');
}else{
 include($_GET['underside']);
}
 ?>

(它会在网页上发布,不会被翻译) (与本页使用的技术相同)

1 个答案:

答案 0 :(得分:0)

使用file_get_contents()将文件读入字符串,使用htmlspecialchars()替换所有特殊字符,然后使用echo()打印字符串。