php jquery ajax中文乱码
date:星期二, 三月 16th, 2010 at 4:12 下午 Categories:php
PHP发送中文、Ajax接收
只需在php顶部加入一句:
header('Content-type: text/html;charset=GB2312');
xmlHttp会正确解析其中的中文。
Ajax发送中文、PHP接收
这个比较复杂:
Ajax中先用encodeURIComponent对要提交的中文进行编码
PHP中:
$view=iconv( 'UTF-8', 'gb2312//IGNORE' , $_POST['view']);

2011.09.18 7:43 下午
Hello there, simply turned into aware of your blog thru Google, and found that it is really informative. I?m gonna watch out for brussels. I will appreciate if you continue this in future. A lot of other folks will be benefited from your writing. Cheers!
[Reply]
2011.09.20 9:10 下午
Hello there, just was alert to your weblog via Google, and located that it’s truly informative. I?m going to watch out for brussels. I will be grateful for those who continue this in future. Lots of folks will likely be benefited out of your writing. Cheers!
[Reply]
2011.09.24 12:32 上午
Cleansing Detox Diet…
[...]php jquery ajax中文乱码[...]…
2011.10.07 2:06 下午
best food processorreviews…
[...]php jquery ajax中文乱码[...]…
2011.12.03 11:39 下午
ugg boots clearance| ugg clearance| ugg boots uk| uk ugg outlet| UGG Classic Tall Boots|UGG Bailey Button Boots|UGG Kensington Boots|UGG Seline Boots…
[...]php jquery ajax中文乱码[...]…