thinkphp3.2 Method to hide home: 1. Add "define('BIND_MODULE','Home');" to index.php; 2. Find "application/commom/conf/config.php" Just add the file configuration as "'URL_MODEL'=>2.".
#The operating environment of this tutorial: Windows 7 system, thinkphp version 3.2, Dell G3 computer.
How to hide home in thinkphp3.2?
thinkphp3.2 How to hide the Home module and index.php entry file
index.phpAdd the following code:
define('BIND_MODULE','Home');
This Just hide the home
in the url and then remove the index.php
Find the application/commom/conf/config.php file and add the following configuration
'URL_MODEL' => 2.
This will be ok.
Related introduction:
The key words of thinkphp3.2 version are modularity, driverization and cloud platform.
Modularization: The architecture of version 3.2 has been specially optimized and adjusted for modular design, making it more suitable for enterprise-level applications. Of course, a large part of this is due to the support for namespaces and the automatic loading mechanism. At the same time, you will see a small detail. ThinkPHP3.2 version comes with an application entry file and application directory.
Drivenization: Version 3.2 tries to adopt driver-based design when designing class libraries. For the same function to be operated in different environments and types, it can be easily transplanted by configuring the driver without changing the existing code. At the same time, It also allows your application to be suitable for more complex operating environments.
Cloud platform: Version 3.2 includes support for various cloud platforms in the underlying core. By customizing different application (scenario) modes and corresponding drivers, you can easily support the deployment and development of cloud platforms. You can Achieve local development and then seamlessly deploy directly to the cloud platform. Currently, SAE and BAE3 are supported.
Note: The PHP version requirement for versions 3.2 and above is PHP5.3 (excluding PHP5.3dev and PHP6). Newbies are advised to master the namespace concept of PHP5.3 first.
Recommended learning: "thinkPHP Video Tutorial"
The above is the detailed content of How to hide home in thinkphp3.2. For more information, please follow other related articles on the PHP Chinese website!