Principle:
Locate the specified controller through the URL address get parameter and make the corresponding method call request
HTTP//URL/index.php?m= module name &c= Controller &a= method
The thinkphp framework URL can have the following four types
1.http://URL/index.php?m= Module name &c= Controller &a= method Basic get mode
2.http://URL/index.php/Module/controller/method Path mode PathInfo
3.http://URL/module/controller/method rewrite override mode
4.http://URL/index.php?s=/Module/controller/method Compatibility mode
Specific URL address mode settings (config file thinkphp/conf/convertion.php)
Url_model = 0/1/2/3 represents four URL address modes respectively
To modify the schema, you can go to your own project directory configuration file modification (shop/common/conf/config.php)
<?phpreturn Array (' url_model ' = 0;);
Role:
Our system is compatible with 4 types of URL address patterns, although set one, but the other three still can access the normal
Set ' Url_model ' + 0; The real function is that the system sometimes automatically creates a URL address, which is used to create a URL address based on the current schema. After Setup, you need to empty the cache before it takes effect, or use development debug mode
U ("module, Controller, Method"); Create the corresponding URL address according to the parameter and URL pattern
thinkphp routing parsing (meaning of four URLs, differences, and setting the true effect of a URL)