PHP strange error: htmlspecialchars handles Chinese missing_PHP tutorial

WBOY
Release: 2016-07-20 11:16:01
Original
982 people have browsed it

<span $value</span> = "中文中文"<span ;
</span><span $res</span> = <span htmlspecialchars</span>(<span $value</span>);
Copy after login

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");
Copy after login

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...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template