当前位置: 首页 > 图文教程 > 网络编程 > PHP > jq的get传参数在utf-8中乱码问题的解决php版

PHP
PHP通用检测函数集合
PHP 常见郁闷问题答解
用PHP的ob_start();控制您的浏览器cache!
smarty 原来也不过如此~~呵呵
PHP动态变静态原理
smarty静态实验表明,网络上是错的~呵呵
ADODB类使用
ADODB结合SMARTY使用~超级强
mysql建立外键
PHP的中问验证码
WINXP下apache+php4+mysql
mysql5写入和读出乱码解决
phpmyadmin的#1251问题
php缓存技术
PHP生成静态页
配置支持SSI
SSI指令
xajax写的留言本
PHP面向对象的使用教程 简单数据库连接
整合了前面的PHP数据库连接类~~做成一个分页类!

PHP 中的 jq的get传参数在utf-8中乱码问题的解决php版


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 326 ::
收藏到网摘: n/a

在php下用jquery传参出现乱码的解决方法 <!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>