zhangjingyu
又一次次的修改、上传、刷新测试,终于(本地之后)又调试好了!
“zhangjingyu 2 112.38.51.112 中国山东省聊城市 莘县”(引用内容)可能跟转换编码的函数有关,本地调试结果是:
“$encode = mb_detect_encoding($str, array('ASCII','UTF-8','GB2312','GBK','BIG5'));
$string = iconv($encode,'GBK',$str);”(引用内容)不知道为什么上传到家园论坛后就不行。于是,重新查找相关函数,找到mb_detect_encoding。经过一次次的测试,终于调试好了。
“$encode = mb_detect_encoding($str, array('ASCII','UTF-8','GB2312','GBK','BIG5'));
//mb_convert_encoding ( string str, string to_encoding [, mixed from_encoding] )字符串,目标编码,原编码
$string =mb_convert_encoding($str,'GBK',$encode);”(引用内容)

