Home > PHP Framework > YII > Where is the yii framework entry file?

Where is the yii framework entry file?

Release: 2019-12-31 15:41:52
Original
3388 people have browsed it

Where is the yii framework entry file?

The entry file of yii2 is placed under /module/web.

The web directory is the entrance to the web program. The index.php in the web directory is an entrance to the application.

Where is the yii framework entry file?

Where is the yii framework entry file?

## Index.php file content:

<?php
defined(&#39;YII_DEBUG&#39;) or define(&#39;YII_DEBUG&#39;, true);
defined(&#39;YII_ENV&#39;) or define(&#39;YII_ENV&#39;, &#39;dev&#39;);

require(__DIR__ . &#39;/../../vendor/autoload.php&#39;);
require(__DIR__ . &#39;/../../vendor/yiisoft/yii2/Yii.php&#39;);
require(__DIR__ . &#39;/../../common/config/bootstrap.php&#39;);
require(__DIR__ . &#39;/../config/bootstrap.php&#39;);

$config = yii\helpers\ArrayHelper::merge(
    require(__DIR__ . &#39;/../../common/config/main.php&#39;),
    require(__DIR__ . &#39;/../../common/config/main-local.php&#39;),
    require(__DIR__ . &#39;/../config/main.php&#39;),
    require(__DIR__ . &#39;/../config/main-local.php&#39;)
);

$application = new yii\web\Application($config);
$application->run();
Copy after login

Recommended learning:

yii framework

The above is the detailed content of Where is the yii framework entry file?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
yii
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template