jq的get传参数在utf-8中乱码问题的解决php版
程序员文章站
2022-04-11 19:11:18
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>untitled document</title>
<script>
document.write(escape("哈哈")+"<br>");
document.write(unescape("%u54c8%u54c8")+"<br>");
document.write(encodeuricomponent("哈哈")+"<br>");
document.write(decodeuricomponent("%e5%93%88%e5%93%88")+"<br>");
</script>
</head>
<body>
<?php
echo urldecode("%e5%93%88%e5%93%88");
echo "<br>";
echo rawurldecode("%e5%93%88%e5%93%88");
echo "<br />";
echo utf8_decode("%e5%93%88%e5%93%88");
echo "<br />";
echo "%e5%93%88%e5%93%88";
echo "<br />";
echo $_get['act'];
echo "<br />";
echo urlencode($_get['act']);
?>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>untitled document</title>
<script>
document.write(escape("哈哈")+"<br>");
document.write(unescape("%u54c8%u54c8")+"<br>");
document.write(encodeuricomponent("哈哈")+"<br>");
document.write(decodeuricomponent("%e5%93%88%e5%93%88")+"<br>");
</script>
</head>
<body>
<?php
echo urldecode("%e5%93%88%e5%93%88");
echo "<br>";
echo rawurldecode("%e5%93%88%e5%93%88");
echo "<br />";
echo utf8_decode("%e5%93%88%e5%93%88");
echo "<br />";
echo "%e5%93%88%e5%93%88";
echo "<br />";
echo $_get['act'];
echo "<br />";
echo urlencode($_get['act']);
?>
</body>
</html>
上一篇: PHP 表单提交给自己
下一篇: 用php过滤危险html代码的函数
推荐阅读
-
jq的get传参数在utf-8中乱码问题的解决php版
-
jq的get传参数在utf-8中乱码问题的解决php版_PHP
-
jq的get传参数在utf-8中乱码问题的解决php版_PHP
-
utf-8编码 jq的get传参数在utf-8中乱码问题的解决php版
-
jq的get传参数在utf-8中乱码问题的解决php版_PHP教程
-
utf-8编码 jq的get传参数在utf-8中乱码问题的解决php版
-
jq的get传参数在utf-8中乱码问题的解决php版_PHP教程
-
jq的get传参数在utf-8中乱码问题的解决php版
-
jq的get传参数在utf-8中乱码问题的解决php版
-
jq的get传参数在utf-8中乱码问题的解决php版