来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 看到 framework lib util filter_class php public static function sql($str){if (get_magic_quotes_gpc()){$str = stripslashes($str);}else{ 不使用主要是因为,先有mysql的连接 $str = m...
看到 /framework/lib/util/filter_class.php
...... public static function sql($str) { if (get_magic_quotes_gpc()){ $str = stripslashes($str); }else{ //不使用主要是因为,先有mysql的连接 //$str = mysql_real_escape_string($str); $str = addslashes($str); } return $str; }.....
public function js() { $id = Filter::sql(Req::args("id")); $model = new Model("ad"); $time = date('Y-m-d'); $ad = $model->where("number = '$id' and start_time<='$time' and end_time >='$time'")->find(); if($ad==null) return; if($ad['is_open']==0) return;
public function reset_password() { $safecode = Filter::sql(Req::args('safecode')); if($safecode!=null && strlen($safecode)==32) { $model = $this->model->table('reset_password'); $obj = $model->where("safecode='".$safecode."'")->find(); $this->assign('status','fail'); $this->assign('safecode',$safecode); if(!empty($obj)) $this->assign('status','success'); $this->redirect(); } else { $this->redirect('index/index'); } }
修复方案:过滤 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com