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,...