* adjust for control send fail.

This commit is contained in:
wangyidong
2016-03-14 08:39:16 +08:00
parent 5188f6aa0b
commit c604bf2ba2
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -752,7 +752,7 @@ class baseControl
if($type != 'json') die();
$data = (array) $data;
if(helper::isAjaxRequest()) print(json_encode($data)) && die(helper::removeUTF8Bom(ob_get_clean()));
if(helper::isAjaxRequest()) print(json_encode($data)) and die(helper::removeUTF8Bom(ob_get_clean()));
/**
* 响应非ajax的请求。
+2 -2
View File
@@ -1961,8 +1961,8 @@ class baseRouter
$errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log.php';
if(!is_file($errorFile)) file_put_contents($errorFile, "<?php\n die();\n?>\n");
$fh = @fopen($errorFile, 'a');
if($fh) fwrite($fh, strip_tags($errorLog)) && fclose($fh);
$fh = fopen($errorFile, 'a');
if($fh) fwrite($fh, strip_tags($errorLog)) and fclose($fh);
/*
* 如果debug > 1,显示warning, notice级别的错误。