* Split tmp files for cli.

This commit is contained in:
zhujinyong
2023-11-15 13:51:24 +08:00
parent f21395a8bb
commit 76e6253ffa
2 changed files with 7 additions and 4 deletions
+4 -2
View File
@@ -3279,7 +3279,8 @@ EOF;
if($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');
@@ -3393,7 +3394,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');