
在修改destoon模板的时候,会报模版内容包含不安全写法,请通过FTP修改模版,怎么处理呢,下面告诉你方法
找到admin目录下的template.inc.php,找到以下,大概在35行 。
function template_safe($content) {
$content =
stripslashes($content);
$content = strip_sql($content,
0);
if(preg_match_all("/script([^>]+)>/i", $content, $matches))
{
foreach($matches[1] as $m) {
$m =
strtolower($m);
if(strpos($m, 'language') !== false || strpos($m, 'php')
!== false)
msg('模板内容包含不安全写法,禁止在线修改或预览');
}
}
if(preg_match("/(\<\?|\{php|file\(|eval|copy|file_put|file_get|fopen|fwrite|fread)/i",
$content)) msg('模板内容包含不安全写法,禁止在线修改或预览');
return $content;
}
把红色部分注释掉:
function template_safe($content) {
$content = stripslashes($content);
$content = strip_sql($content, 0);
if(preg_match_all("/script([^>]+)>/i", $content, $matches)) {
foreach($matches[1] as $m) {
$m = strtolower($m);
if(strpos($m, 'language') !== false || strpos($m, 'php') !== false) msg('模板内容包含不安全写法,禁止在线修改或预览');
}
}
if(preg_match("/(\<\?|\{php|file\(|eval|copy|file_put|file_get|fopen|fwrite|fread)/i", $content)) msg('模板内容包含不安全写法,禁止在线修改或预览');
return $content;
}
注释掉对应的就可以了!
【免责声明】重庆资讯网未标有“来源:重庆资讯网”或“重庆资讯网LOGO、水印的文字、图片、音频、视频”等稿件均为转载稿。如转载稿涉及版权等问题或您不希望出现在本站,请联系我们。