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 |
How to set default controller on yii project ?
Provide steps to install yii 2 framework?
What are the server requirements to install yii2?
How can we set a flash message in yii2?
What are formatter in yii2?
What are the new features acquired in yii2?
How to get current action id in yii ?
What is gii?
Explain request life cycle in yii2 framework.
List some database related query functions in yii?
What is difference between “render” and “renderpartial” in yii?
Benifits of yii over other frameworks?