Home > Backend Development > PHP Tutorial > Phalcon的escape系列函数会把中文也给转义掉?

Phalcon的escape系列函数会把中文也给转义掉?

WBOY
Release: 2016-06-06 20:33:25
Original
1121 people have browsed it

Phalcon又碰到坑了,
Phalcon的escape系列函数会把中文给转义掉,比如我要把字符串里的js script转义掉,用escape_js, 确实把js转义掉了,但是它把我的中文也都转义,请教怎么解决?

我现在只能很low的写这个:
str_replace("script", "被SQL注入了,请联系管理员", $content);

回复内容:

Phalcon又碰到坑了,
Phalcon的escape系列函数会把中文给转义掉,比如我要把字符串里的js script转义掉,用escape_js, 确实把js转义掉了,但是它把我的中文也都转义,请教怎么解决?

我现在只能很low的写这个:
str_replace("script", "被SQL注入了,请联系管理员", $content);

不low吧,你其实已经解决问题了

Related labels:
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