How to specify the running path for yii
After installing the advanced version of the yii framework, enter the backend and frontend and enter the default written by the yii framework. Controller
frontend
##backend
Recommended learning:
Website construction tutorial
Can be modified in line 28 of /vendor/yiisoft/yii2/web/Application.php:
public $defaultRoute = 'site';
Copy after login
Want to enter the homepage written by yourself Without changing the original code of the Yii framework, you can modify the configuration file under /config/main-local.php
and add a line 'defaultRoute' => 'index',
backend
frontend
After modification, you can enter the page you want to enter.
(Related tutorial recommendations:
yii framework)
The above is the detailed content of How to specify the running path in yii. For more information, please follow other related articles on the PHP Chinese website!