Home >Backend Development >PHP Problem >What should I do if php cannot get the value in the URL?
php获取不到网址中的值的解决办法:1、查看url规则;2、将规则修改为“RewriteRule ^/member/editprivilege/([0-9]+) /access.php?_u=mobile/...”即可获取。
本文操作环境:Windows7系统、PHP7.1版、Dell G3电脑。
php获取不到网址中的值怎么办?php获取不到url问号之后的参数?
url规则已定义:
RewriteRule ^/member/editprivilege/([0-9]+) /access.php? _u=mobile/editprivilege&aid=$1 [L]
使用$_GET获取不到id
url规则改为
RewriteRule ^/member/editprivilege/([0-9]+) /access.php? _u=mobile/editprivilege&aid=$1 [L,QSA]
即可获取。
推荐学习:《PHP视频教程》
The above is the detailed content of What should I do if php cannot get the value in the URL?. For more information, please follow other related articles on the PHP Chinese website!