Google News
logo
Yii framework - Interview Questions
What is the first file that loaded when you run an application using Yii?
index.php is the first file that loaded when we run an application using the Yii application. It will create a new object of new yii\web\Application and start the application.
require(__DIR__ . '/../vendor/autoload.php');  
require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');  
  
// load application configuration  
$config = require(__DIR__ . '/../config/web.php');  
  
// instantiate and configure the application  
(new yii\web\Application($config))->run(); ​
 
Advertisement