/** * 根据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); }
如对本文有疑问, 点击进行留言回复!!
DM数据库:dm.ini参数(五)预先装载表、客户端缓存、REDO 日志、事务相关参数
php+mysql获取7天、30天的统计数据,没有数值的补充0 By勤勤学长
第一章 第六小节Duilib的WindowImplBase基类OnCreate函数中调用AttachDialog函数
网友评论