From: Aleksey Filippov Date: Fri, 28 Mar 2025 08:22:13 +0000 (+0300) Subject: отладка пути X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=e647370d16f4e49db66f64c01e7e861f49fe57e9;p=erp24_rep%2Fyii-erp24%2F.git отладка пути --- diff --git a/erp24/media/controllers/NotificationController.php b/erp24/media/controllers/NotificationController.php index 0de69eb3..3b9cf8e3 100644 --- a/erp24/media/controllers/NotificationController.php +++ b/erp24/media/controllers/NotificationController.php @@ -26,6 +26,12 @@ class NotificationController extends Controller const OUT_DIR = //"/www/media/notification"; "/var/www/erp24/media/notification"; + + private static function getPath() + { + return dirname(__DIR__, 1); + } + public function actionTest() { $request = Yii::$app->request; @@ -98,7 +104,7 @@ class NotificationController extends Controller Yii::error("Ошибка декодирования JSON: " . $e->getMessage()); Yii::$app->response->statusCode = 400; file_put_contents( - self::OUT_DIR . '/notification_error.txt', + self::getPath() . '/notification_error.txt', PHP_EOL . date("d.m.Y H:i:s", time()) . " " . $e->getMessage() . $e->getLine(), FILE_APPEND );