php安全,防注入类.zip

时间:2022-07-31 04:28:54
【文件属性】:
文件名称:php安全,防注入类.zip
文件大小:2KB
文件格式:ZIP
更新时间:2022-07-31 04:28:54
类库下载-php安全,防注入类 <?php class Params {   public $get = array();   public $post = array();   function __construct()   {     if (!empty($_GET)) {       foreach ($_GET as $key => $val) {         if (is_numeric($val)) {           $this->get[$key] = $this->getInt($val);         } else {           $this->get[$key] = $this->getStr($val);         }       }     }     if (!empty($_POST)) {       foreach ($_POST as $key => $val) {         if (is_numeric($val)) {           $this->post[$key] = $this->getInt($val);         } else {           $this->post[$key] = $this->getStr($val);         }       }     }   }这是一个PHP的安全库,使用预备义语句和参数化查询。对于带有任何参数的sql语句都会被发送到数据库服务器,并被解析!对于攻击者想要恶意注入sql是不可能的!
【文件预览】:
php安全,防注入类
----php中文网下载站.url(114B)
----jdfzrl.php(1KB)
----php中文网免费下载站.txt(219B)

网友评论