涉及文件:
phpcms\modules\admin\urlrule.php
step1.将文件中如下代码:
$this->url_ifok($_POST['info']['urlrule'])
修改为:
$this->url_ifok($_POST['info']['urlrule'], $_POST['info']['ishtml'])
step2.将如下函数:
public function url_ifok($url){
$urldb = explode("|",$url);
foreach($urldb as $key=>$value){
if(strpos($value, "index.php") === 0){
$value = substr($value,'9');
}
if( stripos($value, "php") !== false){
return false;
}
}
return true;
}
替换为:
public function url_ifok($url, $ishtml){
$urldb = explode("|",$url);
foreach($urldb as $key=>$value){
if(!intval($ishtml) && strpos($value, "index.php") === 0){
$value = substr($value,'9');
}
if( stripos($value, "php") !== false){
return false;
}
}
return true;
}
评论
本文评论功能已关闭。