string(0) "" }"/> string(0) "" }">
Home > Backend Development > PHP Tutorial > PHP:没办法获取参数中的html编码值

PHP:没办法获取参数中的html编码值

WBOY
Release: 2016-06-06 20:43:30
Original
993 people have browsed it

URL:http://127.0.0.1/test.php?v=h

代码

<code>

<meta charset="utf-8">


<?php var_dump($_GET);
?>


</code>
Copy after login
Copy after login

结果:array(1) { ["v"]=> string(0) "" }

回复内容:

URL:http://127.0.0.1/test.php?v=h

代码

<code>

<meta charset="utf-8">


<?php var_dump($_GET);
?>


</code>
Copy after login
Copy after login

结果:array(1) { ["v"]=> string(0) "" }

关键在于那个&符号让PHP把参数这么理解了v= & #x68,所以自然接受到的就是空了。切记url传参最好都做一次urlencode,而不是base64_encode

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