Quantcast
Channel: 恋香缘 –恋香缘
Viewing all articles
Browse latest Browse all 77

Detected an illegal character input string的解决方法

$
0
0

在PHP中使用iconv转化字符串编码时出现错误。具体错误为:
Detected an illegal character input string

出错的语句内容为:iconv("GB2312","UTF-8",$a);

解决的方法是将GB2312换为GBK。

出现这个错误的原因是因为$a中出现了超出GB2312范围的字符,所以换用范围更广的GBK编码。问题得到解决。


Viewing all articles
Browse latest Browse all 77

Latest Images

Trending Articles





Latest Images