Home > php教程 > php手册 > 总结PHP代码转义的相关方法

总结PHP代码转义的相关方法

WBOY
Release: 2016-06-13 11:08:52
Original
903 people have browsed it

我们在使用

  1.  ?php   
  2. echo trans($row_rs['content']);   
  3. ?> 

你可以根据需要套用不同的函数进行PHP代码转义

补充一点,如果在span中显示文章中的一段,采用substr取定长字符串时,记得在span的参数后面多加一个空格,否则遇上截到半个汉字时,会搞乱html代码。


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