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
Supposing you have a writable "uploads" folder in your application:
You can define a param like this:
Yii::$app->params['uploadPath'] = realpath(Yii::$app->basePath) . '/uploads/';
Then you can simply use the parameter as:
$path1 = Yii::$app->params['uploadPath'] . $filename;
Just depending on if you are using advanced or simple template the base path will be (following the link provided by phazei):
Simple @app: Your application root directory
Advanced @app: Your application root directory (either frontend or backend or console depending on where you access it from)
This way the application will be more portable than using realpath(dirname(__FILE__).'/../../'));