Home PHP Libraries Other libraries Very useful PHP anti-injection class
Very useful PHP anti-injection class
<?php 
/** 
 * 参数处理类 
 * @author JasonWei 
 */ 
class Params 
{ 
    public $get = array(); 
 
    public $post = array(); 
 
    function __construct() 
    { 
if (!emptyempty($_GET)) { 
    foreach ($_GET as $key => $val) { 
if (is_numeric($val)) { 
    $this->get[$key] = $this->getInt($val); 
} else { 
    $this->get[$key] = $this->getStr($val); 
} 
    } 
} 
if (!emptyempty($_POST)) { 
    foreach ($_POST as $key => $val) { 
if (is_numeric($val)) { 
    $this->post[$key] = $this->getInt($val); 
} else { 
    $this->post[$key] = $this->getStr($val); 
} 
    } 
}

This is a very useful PHP anti-injection class. Friends who need it can download and use it

Disclaimer

All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn

Related Article

20 Very Useful PHP Class Libraries_PHP Tutorial 20 Very Useful PHP Class Libraries_PHP Tutorial

15 Jul 2016

20 extremely useful PHP libraries. Below are some very useful PHP libraries, which I believe can provide a better and faster method for your WEB development. Chart libraries The following libraries allow you to easily create complex charts.

Recommend 25 very useful class libraries in PHP Recommend 25 very useful class libraries in PHP

10 Apr 2018

The content of this article is to recommend 25 very useful class libraries in PHP. It has certain reference value. Friends in need can refer to it.

What are some very useful class libraries or tool libraries for PHP? What are some very useful class libraries or tool libraries for PHP?

06 Jul 2016

What are some very useful class libraries or tool libraries for PHP?

Recommended 25 very useful class libraries in PHP, 25 non-Chinese class libraries in PHP_PHP Tutorial Recommended 25 very useful class libraries in PHP, 25 non-Chinese class libraries in PHP_PHP Tutorial

13 Jul 2016

Recommend 25 very useful class libraries in PHP and 25 non-Chinese class libraries in PHP. Recommended 25 very useful class libraries in php, 25 non-class libraries in php Snappy Snappy is PHP5 used to generate thumbnails, snapshots, PDF, URL or HTML pages. It uses the excellent WebKit-based wkht

PHP anti-sql injection class (php pdo prevents sql injection class) PHP anti-sql injection class (php pdo prevents sql injection class)

25 Jul 2016

PHP anti-sql injection class (php pdo prevents sql injection class)

PHP anti-sql injection data model class PHP anti-sql injection data model class

11 Nov 2016

<?php class Model{ protected $tableName="";//表名称 protected $pOb;//pdo类对象 function __construct(){ $pdo=new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME,DB_USERNAME, ...

See all articles