Different ways to bind modules and controllers under modules in different versions of the thinkphp framework in the portal file
Source: Internet
Author: User
For thinkPHP3.2.0 versions:
Loading modules
$_get[' m '] = ' module name ';
Example: $_get[' m '] = ' admin '; for loading Admin module (backend module)
The controller under the load module
$_get[' c '] = ' controller name ';
Example: $_get[' c '] = ' Admin '; for loading the Admincontroller controller under the Admin module
For thinkPHP3.2.1 and above versions:
Loading modules
Define (' Bind_module ', ' module name ');
For example: Define (' Bind_module ', ' admin '), for loading the Admin module
The controller under the load module
Define (' Bind_controller ', ' controller name ');
For example: Define (' Bind_controller ', ' admin '), for loading the Admincontroller under the Admin module
These are defined at the entry file of the corresponding module for example: admin module defined under admin.php file
The home module is defined under the index.php file
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.