How can we get all root directory path in yii2?
Answer / Mayank Pushkar
In Yii2, you can get the root directory path using Yii::getAlias('@app'). Here's an example:
```php
echo Yii::getAlias('@app');
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is name of first file the loaded when yii 2.0 framework starts?
What is yii?
what is meant by yii framework?
What is the purpose of “gii” in yii2?
What are the steps to install yii2?
What are the requirements of the yii?
How to get current controller name?
How we can change the url for yii::app()->homeurl in yii2?
Why yii is so fast?
How we can get current controller & action name in yii?
How to make layout in yii?
How we can call layouts in controller file in yii?