diff --git a/app/service/CertDeployService.php b/app/service/CertDeployService.php index 092cd41..71c5296 100644 --- a/app/service/CertDeployService.php +++ b/app/service/CertDeployService.php @@ -131,6 +131,7 @@ class CertDeployService private function saveLog($txt) { if (empty($this->task['processid'])) return; + if (!is_dir(app()->getRuntimePath() . 'log')) mkdir(app()->getRuntimePath() . 'log'); $file_name = app()->getRuntimePath().'log/'.$this->task['processid'].'.log'; file_put_contents($file_name, $txt . PHP_EOL, FILE_APPEND); if(php_sapi_name() == 'cli'){ diff --git a/app/service/CertOrderService.php b/app/service/CertOrderService.php index 7b86da5..7b1717d 100644 --- a/app/service/CertOrderService.php +++ b/app/service/CertOrderService.php @@ -417,6 +417,7 @@ class CertOrderService private function saveLog($txt) { if (empty($this->order['processid'])) return; + if (!is_dir(app()->getRuntimePath() . 'log')) mkdir(app()->getRuntimePath() . 'log'); $file_name = app()->getRuntimePath().'log/'.$this->order['processid'].'.log'; file_put_contents($file_name, $txt . PHP_EOL, FILE_APPEND); if(php_sapi_name() == 'cli'){