Solution for php to obtain parameters with special symbols such as # in the URL,
For example the following PHP code:
Copy code The code is as follows:
echo $_GET['key'];
?>
When the url is http://test.com/c.php?key=999, the normal output is: 999
When the url is http://test.com/c.php?key=9#888, it can only output: 9
What I want to get is 9#888, so what should I do? We can only find a way to pass 9#888 to the key.
I solved this problem by encoding and passing the escape function in JS. Friends in need can refer to it.
Copy code The code is as follows:
$_SERVER['HTTP_REFERER']
$url = zhidao.baidu.com/question/123456789.html
file_get_contents($url);
http://www.bkjia.com/PHPjc/873342.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/873342.htmlTechArticlephp solution for obtaining parameters with special symbols such as # in the URL, such as the following PHP code: Copy code code As follows: php echo $_GET['key']; When the url is http://test.com/c.phpkey=999,...
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