<? The URL modes supported by PHP // thinkphp include normal mode, pathinfo mode, rewrite mode, and compatibility mode, and provide route support. The default value is pathinfo. // For example, the URL in normal mode is: // http: // localhost/appname/index. php? M = modulename & A = actionname & id = 1 // 1. in pathinfo mode, the URL is // http: // localhost/appname/index. PHP/modulename/actionname/ID/1 // The pathinfo mode does not affect the previous programming methods, and the value passing through get and post methods is still valid because the system will automatically process pathinfo, for example, the value of ID in the URL above can be obtained through $ _ Get ['id. // 2. if the rewrite mode is used, the URL can be: // http: // localhost/appname/modulename/actionname/ID/1 // For example, if the MyApp project generated above is accessed through the following url: // http: // localhost/MyApp // In fact, it is to locate the index operation of the index module of the MyApp project, because the system will execute the default module and operation when no module or operation is specified, in thinkphp's conventional configuration, the index module and index operations are involved. Therefore, the following URL is the same as the above result: // http: // localhost/MyApp/index. PHP/index // use the project configuration parameters to change the default configuration. // The system also supports the grouping mode and URL routing functions, which can bring different URL experiences. // Suppose I write in TP/index. phpProgram Call the class indexaction extends action {Public Function Index () {// default access controller method of TP. You can set echo 'HTTP: // blog.csdn.net/ljfbest is my blog '; // enter http: // localhost/TP/in the address bar, and the result will be output because the system will execute the default module and operation when no module or operation is specified, in thinkphp's conventional configuration, the index module and the index operation} public function show () {// by default, a calls echo 'url routing mode test '; echo $ _ Get ['id']; // enter http: // localhost/TP/index in the address bar. PHP? A = show & id = 3 (called by a by default) Press enter to change the address bar to http: // localhost/TP/index. PHP/index/show/ID/3 Output URL routing mode test 3 }}?>