Rumah > Soal Jawab > teks badan
当我开启 'URL_PARAMS_BIND_TYPE'=>1, //传参模式,允许顺序传参,也就是URL不写变量名
访问
http://localhost/yb1/Home/Get...
怎么啥也没有?
请问在thinkPHP 里怎么给 $_GET[""] 赋值?
public function test($id ,$name ) { echo $_GET["id"] . "-" . $_GET["name"]; }
面对疾风吧2016-11-08 14:44:22
dump($_REQUEST); 看看,数值前面要有参数名 形如/id/23
例:http://192.168.45.3:8125/home...
array(2) { ["id"] => string(2) "23" ["_URL_"] => array(4) { [0] => string(4) "home" [1] => string(5) "index" [2] => string(2) "id" [3] => string(2) "23" } }