It's online today.
Json_encode (Htmlentities ($value))
The discovery appeared!
[03-jul-2015 02:52:44 UTC] PHP warning:json_encode_plus () [<a href= ' Function.json-encode-plus ' >function.json-encode-plus</a>]: Invalid UTF-8 sequence in argument in/home/users/ouerqiang/fbiz/framework/bizbootstrap.php on line 106
At first glance, I don't know what the problem is, after it appears that the data found before PHP 5.4
Htmlentities (String,quotestyle,character-set)
Among them character-set=so-8859-1.
If there is Chinese words will be garbled can not escape, Json_encode only recognize UTF-8. Cause error.
Switch
Htmlentities ($instance, ent_quotes, ' UTF-8 ')
Solve
This article is from the "dream to think XI" blog, please be sure to keep this source http://qiangmzsx.blog.51cto.com/2052549/1670507
PHP5.3 htmlentities and Json_encode's pit