no commit message

This commit is contained in:
雨中磐石
2024-10-18 15:27:40 +08:00
parent 9a2a3a2c8a
commit 559c388ea0
103 changed files with 2021 additions and 783 deletions

View File

@@ -65,4 +65,30 @@ class coginiClassAction extends Action
}
public function phperrAction()
{
echo '<title>PHP错误信息查看</title>';
$path = @ini_get('error_log');
if(!$path)return '未设置记录php错误路径去<a href="'.URLY.'view_phperr.html">看看</a>如何设置。';
$cont = '无内容';
if(file_exists($path) && getconfig('systype')!='demo'){
$cont = @file_get_contents($path);
$str = '';
if($cont){
$arr = explode("\n", $cont);
$len = count($arr);
for($i=0;$i<$len;$i++){
$str1 = $arr[$i];
$str2 = str_replace('\\','/', $str1);
if(contain($str2, ROOT_PATH)){
if($str)$str.='<hr>';
$str.=$str1;
}
}
}
$cont = $str;
}
return $cont;
}
}