diff --git a/application/common.php b/application/common.php index 94ce94fae..e46c159f3 100644 --- a/application/common.php +++ b/application/common.php @@ -25,7 +25,7 @@ use think\Db; function p($data, $force = false, $file = null) { is_null($file) && $file = env('runtime_path') . date('Ymd') . '.txt'; - $str = (is_string($data) ? $data : (is_array($data) || is_object($data)) ? print_r($data, true) : var_export($data, true)) . PHP_EOL; + $str = (is_string($data) ? $data : ((is_array($data) || is_object($data)) ? print_r($data, true) : var_export($data, true))) . PHP_EOL; $force ? file_put_contents($file, $str) : file_put_contents($file, $str, FILE_APPEND); }