yii2 Question
My yii2 install in d:\\wamp\\www\\yii2store
I want to get above path to save images which will be uploaded by me
If you want to get the root directory of your yii2 project use, assuming that the name of your project is project_app you'll need to use:
echo Yii::getAlias('@app');
on windows you'd see "C:\dir\to\project_app"
on linux you'll get "/var/www/dir/to/your/project_app"
I was formally using:
echo Yii::getAlias('@webroot').'/..';
I hope this helps someone