Home > Backend Development > PHP Problem > 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?

藏色散人
Release: 2023-03-14 18:22:02
Original
1716 people have browsed it

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]
Copy after login

使用$_GET获取不到id

url规则改为

RewriteRule ^/member/editprivilege/([0-9]+) /access.php?
_u=mobile/editprivilege&aid=$1 [L,QSA]
Copy after login

即可获取。

推荐学习:《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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template