作者StarTouching (抚星)
看板PHP
标题GET不支援中文/unicode?
时间Mon Apr 30 04:27:15 2007
in php,
$name = "中文";
$target = "mypage.php?msg=$name";
mypage编辑与显示语言是UTF8,
显示不出来$_GET[msg]
除了把mypage.php编码改成big5,
还有其他方法吗?
如果再不行的话 我只好改用session
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.230.177.193
※ 编辑: StarTouching 来自: 125.230.177.193 (04/30 05:06)
1F:→ readper:浏览器会把URL编码再传送 中文还是用POST的吧 04/30 05:10
2F:→ readper:还有 应该是 $_GET['msg'] 04/30 05:11
3F:→ readper:你不能决定用户端的浏览器用什麽编码 所以还是别用GET吧 04/30 05:12
4F:推 grassboy2:别用get感觉有点夸张...囧a 不过如果要传中文… 04/30 09:41
5F:→ grassboy2:那还是urlencode()比较实在… 04/30 09:41
6F:→ readper:是我说错 应该是说url尽量别用中文 不是get别用 04/30 11:28