* Split tmp file for cli.

This commit is contained in:
朱金勇
2023-11-15 06:57:37 +00:00
parent 7ff5670512
commit c405d9a1b1
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -3144,7 +3144,8 @@ EOF;
if($log or $app->config->debug)
{
$logFile = $app->getLogRoot() . 'saas.'. date('Ymd') . '.log.php';
$runMode = PHP_SAPI == 'cli' ? '_cli' : '';
$logFile = $app->getLogRoot() . 'saas' . $runMode . '.' . date('Ymd') . '.log.php';
if(!file_exists($logFile)) file_put_contents($logFile, '<?php die(); ?' . '>');
$fh = fopen($logFile, 'a');