首页| 版块| 我的| 发帖| 消息
主题:关于帖子阅读页显示的ip地址来源(SQL 语句)
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);”(引用内容)
zhangjingyu回帖于2025-12-09 13:24[查看电脑版]
下一楼»:“$string = iconv($encode,'GBK',$str);”(引用内 ..
«上一楼:ip138好好的,怎么这个chinaz.com的在线ip没能传递进去?

查看全部回帖(200)
«返回主帖