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;
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
);