Front Entrance file index.php
<?php//+----------------------------------------------------------------------//| thinkphp [WE CAN do IT JUST THINK]//+----------------------------------------------------------------------//| Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.//+-------------------------------------------------- --------------------// | Licensed (http://www.apache.org/licenses/LICENSE-2.0)//+------------------------------------------------------- ---------------// | author:liu21st <[email protected]>//+--------------------------------------------------------------- -------//Application entry file//Detect PHP Environment if (Version_compare (php_version, ' 5.3.0 ', ' < ') die (' Require PHP > 5.3.0! '); /Open debug mode recommend the development phase to open the deployment phase note or set to Falsedefine (' App_debug ', True);//define Runtime directory define (' Runtime_path ', './runtime/');// Define the path of the static page define (' Html_path ', './html/');//define the application directory define (' App_path ', './application/');//define the default module define (' Bind_ MODULE ', ' Home '),//define the site root directory define (' Web_path ', DirName (__file__));//import thinkphp ' import file require '.Thinkphp/thinkphp.php ';//Pro ^_^ You don't need any code behind it, it's so easy.
Background entry file admin.php
<?php//+----------------------------------------------------------------------//| thinkphp [WE CAN do IT JUST THINK]//+----------------------------------------------------------------------//| Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.//+-------------------------------------------------- --------------------// | Licensed (http://www.apache.org/licenses/LICENSE-2.0)//+------------------------------------------------------- ---------------// | author:liu21st <[email protected]>//+--------------------------------------------------------------- -------//Application entry file//Detect PHP Environment if (Version_compare (php_version, ' 5.3.0 ', ' < ') die (' Require PHP > 5.3.0! '); /Open debug mode recommend the development phase to open the deployment phase note or set to Falsedefine (' App_debug ', True);//define Runtime directory define (' Runtime_path ', './runtime/');// Define the path of the static page define (' Html_path ', './html/');//define the application directory define (' App_path ', './application/');//define the default module define (' Bind_ MODULE ', ' Admin ');//define the site root directory define (' Web_path ', DirName (__file__));//import thinkphp ' import file require './thinkphp/thinkphp.php ';//Pro ^_^ You don't need any code behind it, it's so easy.
In this way the URL can easily remove the module name, no need to configure the configuration file configuration what default module, what module list,, haha. I have tried, unless you have only one module, and if there are multiple modules, it is best to configure like me ....
thinkphp3.2 defining multiple modules and setting default modules