发表时间:2015-05-27来源:网络
/** * 根据ascii码过滤控制字符 * @param type $string */ public static function special_filter($string) { if(!$string) return ''; $new_string = ''; for($i =0; isset($string[$i]); $i++) { $asc_code = ord($string[$i]); //得到其asc码 //以下代码旨在过滤非法字符 if($asc_code == 9 || $asc_code == 10 || $asc_code == 13){ $new_string .= ' '; } else if($asc_code > 31 && $asc_code != 127){ $new_string .= $string[$i]; } } return trim($new_string); }
CI框架连接数据库配置操作以及多数据库操作
asp 简单读取数据表并列出来 ASP如何快速从数据库读取大量数据
C语言关键字及其解释介绍 C语言32个关键字详解
C语言中sizeof是什么意思 c语言里sizeof怎样用法详解
PHP中的魔术方法 :__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep,
PHP中的(++i)前缀自增 和 (i++)后缀自增
将视频设置为Android手机开机动画的教程
最简单的asp登陆界面代码 asp登陆界面源代码详细介绍
常用dos命令及语法
PHP中include和require区别之我见
2014-09-05
2022-03-20
2022-03-21
2022-03-24
2014-09-05
2014-09-05
2015-07-05
2014-09-05
2022-03-21
2014-09-05