There are four thinkphp URL patterns, the default is PathInfo mode, the other three are: normal mode, rewrite and compatibility mode.
The browser input format is:
http://localhost/demo39/index.php/module/Controller/operation
The controller at home establishes the UserController.calss.php as shown in:
Enter HTTP on the browser ://localhost/demo39/index.php/home/user
The results are as follows: user index
In the browser, enter the above mentioned input format, such as http://localhost/demo39/index.php/home/user/test/user/lee/pass/123
is displayed as:
The default delimiter in PATHINFO mode is/, we can set it to what you want, for example: _
At this point, modify the common/conf/config.php under
Add to
Set the PATHINFO ' url_pathinfo_depr ' = ' _ ',
As shown in the following:
At this point, enter HTTP on the browser ://localhost/demo39/index.php/home_user_test_user_lee_pass_123
It is important to note that you will start using the _ symbol after home to get the result as shown:
Thinkphp has four types of URL patterns, the default pathinfo mode