mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
Update common.php
This commit is contained in:
parent
43ee139314
commit
f0abce75e9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user