In thinkphp, the principle is similar in URL participating ASP, the following is a brief explanation of single parameter and multiple parameter passing way
1. Flyer parameters
A single parameter is relatively simple, such as imagining an edit operation that passes an ID value, as in the following notation __URL__/EDIT/ID/1
Http://localhost/index.php/user/edit/id/1
ID and its value 1 are to be located/behind each
The background gets the ID by $id =$_get[' id ') to get its specific value.
2. Pass multiple parameters
It is a bit more troublesome to pass multiple parameters, and there are two ways
The first type: Pass ID, and status
Http://localhost/index.php/user/edit/id/1/status/2
The status parameter is immediately followed by writing
Get two parameters in the background
$id =$_get[' id ']; $status =$_get[' status ');
There is also a more general use of the following:
http://localhost/index.php/user?id=1&&status=2
However, this method can not be obtained by $_get[' ID '), which needs to be done in the following way
$id =$_request[' id ']; $status =$_request[' status '); //Can be obtained by $_get[' ID '), via $_request[' ID ').
Several ways of URL-passing parameters in thinkphp