PHP学习手册 字符串(一)
2016-03-04 11:57
525 查看
1. 字符转义
addcslashes($str,$list);
addslashes($str); 返回字符串,该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线。这些字符是单引号(')、双引号(")、反斜线(\)与 NUL(
htmlentities();
html_entity_decode(); 把 HTML 实体转换为字符 html_entity_decode() 函数是 htmlentities() 函数的反函数
htmlspecialchars();
htmlspecialchars_decode(); 被转换的实体有: &, " (没有设置
2.字符
addcslashes($str,$list);
addslashes($str); 返回字符串,该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线。这些字符是单引号(')、双引号(")、反斜线(\)与 NUL(
NULL字符)。
htmlentities();
html_entity_decode(); 把 HTML 实体转换为字符 html_entity_decode() 函数是 htmlentities() 函数的反函数
htmlspecialchars();
htmlspecialchars_decode(); 被转换的实体有: &, " (没有设置
ENT_NOQUOTES时), ' (设置了
ENT_QUOTES时), < 以及>。
2.字符
相关文章推荐
- PHP文件夹管理类
- Zend Framework教程之模型Model基本规则和使用方法
- dotnetperls
- Zend Framework教程之Zend_Layout布局助手详解
- php反射类 ReflectionClass
- PHP进制转换[实现2、8、16、36、64进制至10进制相互转换]
- php代码编码问题
- installing ffmpeg
- How to get the latest FFmpeg binaries for Windows
- PHP中字符串与多进制转换函数
- php mailer类调用远程SMTP服务器发送邮件实现方法
- getAttibute和getParameters的区别
- wampserver php 设置时间
- PHP基础——表达式、位运算、数组
- PHP调试
- PHP使用curl模拟post上传及接收文件的方法
- 【小镇的技术天梯】php smarty模板的安装与使用(一)
- 50个PHP程序性能优化的方法
- 【PHP学习】move_uploaded_file的使用
- 【PHP学习】move_uploaded_file的使用