Multi-Entrance design
You can set multiple portals for the same application and modules, and different entry files can be set to different application modes or binding modules.
For example, we add a home.php entry file to the index.php file's sibling directory and bind the home module:
<?php
Turn on debug mode suggest that the development phase open the deployment phase annotation or set to false define (' App_debug ', True);
$_get[' m '] = ' home '; Bind Home Module to current entry file//Definition application directory define (' App_path ', './application/');
Introduce the thinkphp entry file require './thinkphp/thinkphp.php '; After the setup completes, enter Http://serverName/index.php/Home/Index/index = http:// Servername/home.php/index/index's finished two entrances.
2, in the same way, we can also bind the controller in the entry file, for example:
$_get[' m '] = ' home '; Bind home module to current portal file
$_get[' c '] = ' Index '; Bind the index controller to the current portal file
Define (' App_path ', './application/');
Require './thinkphp/thinkphp.php ';
After binding, the original access address Http://serverName/index.php/Home/Index/index = Http://serverName/home.php/index