thinkphp3.2 defining multiple modules and setting default modules

Source: Internet
Author: User

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 suggest the development phase to open the deployment phase gaze or set to Falsedefine (' App_debug ', True);//define the Execution folder define (' Runtime_path ', './runtime/');// Define the path of the static page define (' Html_path ', './html/');//define the Application Folder define (' App_path ', './application/');//define the default module define (' Bind_ MODULE ', ' Home ');//define Site root folder define (' Web_path ', DirName (__file__));//import thinkphp import file require'./thinkphp/thinkphp.php ';//Pro ^_^ No matter what code it is, it's so simple. 

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 suggest the development phase to open the deployment phase gaze or set to Falsedefine (' App_debug ', True);//define the Execution folder define (' Runtime_path ', './runtime/');// Define the path of the static page define (' Html_path ', './html/');//define the Application Folder define (' App_path ', './application/');//define the default module define (' Bind_ MODULE ', ' Admin ');//define Site root folder define (' Web_path ', DirName (__file__));//import thinkphp import file require './thinkphp/thinkphp.php ';//Pro ^_^ No matter what code it is, it's so simple. 

This kind of words URL can easily remove the module name, no need to configure the configuration file configuration what default module, what module list,, haha. I've tried it, unless you just have a module, and, assuming there are multiple modules, it's best to configure like me ....

thinkphp3.2 defining multiple modules and setting default modules

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.