Hi, i have a such problem:
In Yii2 advanced, in common/config/bootsrap.php has created @alias in which it is necessary to store photos, but there is a problem:
-
if the script runs on the frontend - then the @folder is created in
one place
-
and if the script runs on the backend - then the @folder is created
elsewhere.
How to make so that the folder was created only in frontend?
More information:
Image with directory structure:
7610
.htaccess file code for both files
7611
Code for: backend/controllers/ActionThatCreateTheDirecotry:
$dir = Yii::getAlias(’@images’) . ‘/blog/’;
FileHelper::createDirectory($dir);