php 使用$_SERVER["REQUEST_URI"]获取url中含中文乱码的解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ougexingfuba/article/details/82258350
$request_uri = $_SERVER["REQUEST_URI"];//获取当前页url
			var_dump(urldecode($request_uri));

中文等自动urlencode了.所以用urldecode($_SERVER['REQUEST_URI'])就转回来了

猜你喜欢

转载自blog.csdn.net/ougexingfuba/article/details/82258350