Home  >  Article  >  Backend Development  >  What should I do if php cannot get the value in the URL?

What should I do if php cannot get the value in the URL?

藏色散人
藏色散人Original
2022-01-06 10:39:061685browse

php获取不到网址中的值的解决办法:1、查看url规则;2、将规则修改为“RewriteRule ^/member/editprivilege/([0-9]+) /access.php?_u=mobile/...”即可获取。

What should I do if php cannot get the value in the URL?

本文操作环境: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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn