<span $value</span> = "中文中文"<span ; </span><span $res</span> = <span htmlspecialchars</span>(<span $value</span>);
After being processed by this function, $res directly becomes an empty string.
What a weird mistake! Later I found out that this is how to succeed. I have never encountered it before. It’s strange!
<span htmlspecialchars</span>(<span $value</span>, ENT_NOQUOTES, "gb2312");
It’s OK to deal with it this way. If you don’t know how serious it is, if you don’t know how serious it is...
BY THE WAY:PHP VERSION:5.3.10