search
HomePHP LibrariesOther librariesVery 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 Tutorial20 Very Useful PHP Class Libraries_PHP Tutorial

15Jul2016

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 PHPRecommend 25 very useful class libraries in PHP

10Apr2018

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?

06Jul2016

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 TutorialRecommended 25 very useful class libraries in PHP, 25 non-Chinese class libraries in PHP_PHP Tutorial

13Jul2016

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)

25Jul2016

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

See all articles