Home >Backend Development >PHP Tutorial >PHP strange error: htmlspecialchars handles Chinese missing_PHP tutorial

PHP strange error: htmlspecialchars handles Chinese missing_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:16:011006browse

<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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440137.htmlTechArticle= "中文中文" = ( ); After being processed by this function, $res becomes empty directly. string. What a weird mistake! Later I found out that this is how to succeed, I have never encountered it before, strange...
Statement:
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