Home > php教程 > php手册 > PHP iconv(): Unknown error (22)

PHP iconv(): Unknown error (22)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:52:21
Original
1914 people have browsed it

今天遇到这个错误,很诡异,尝试重新编译安装libiconv和php未果

写了段代码一测试,发现写成utf8时,就会报错

PHP Notice:  iconv(): Unknown error (22) in /home/web/Liv.php on line 4
如果写成utf-8,就一切大吉了,看来习惯很重要。

我的版本是

libiconv-1.13.1
php-5.3.8


[php]
$str="嘿嘿"; 
iconv('gbk','utf8',$str); 
//iconv('gbk','utf-8',$str); //这个才是正确的 
echo $str; 
?> 

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template