PHP学习手册 字符串(一)

1. 字符转义

  addcslashes($str,$list);

  addslashes($str);   返回字符串,该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线。这些字符是单引号(')、双引号(")、反斜线(\)与 NUL(NULL 字符)。

  htmlentities(); 

  html_entity_decode(); 把 HTML 实体转换为字符    html_entity_decode() 函数是 htmlentities() 函数的反函数

  htmlspecialchars();

  htmlspecialchars_decode(); 被转换的实体有: &" (没有设置ENT_NOQUOTES 时), ' (设置了 ENT_QUOTES 时), < 以及>

2.字符

  

posted on 2016-03-04 11:57  jsHtml  阅读(183)  评论(0编辑  收藏  举报

导航