How can I get the parameters in url?

clipboard.png

clipboard.png

Why can"t I get the value of sd? May I ask you to have a look?

The framework used for

is thinkphp5"s fastadmin

Mar.04,2021

url with parameters should be like this: http://www.url.com/page.php?k.


what framework you use, the framework itself should have its own method to obtain request parameters.


$request = Request::instance();
echo ':';
var_dump($request->param());

the parameter begins after the question mark. Yours is not a parameter.
from "?" The part between the beginning and the "- sharp" is the parameter part, also known as the search part and the query part.


this is the URL that has been processed after opening the REWRITE mode, so it will hide the part of the query. If you want to get the query parameters, either turn off REWRITE, or directly check the documentation to see how to get the action parameters (for example, you may be able to get them in the controller with $sd ). The


framework parses the parameter key-value pairs from uri and puts them into the $_ REQUEST array. Not stored in get and post

Menu