Illegal data processing <?php of GET or post commit value
//********************************************************
--Program Name: Strswap V1.01
--Program writing: [Email]cngift@163.com[/email]
--Completed: 2002-8-1
--Program Purpose: illegal data processing of Get or post submission value
--Note: This program needs to be loaded before all programs are processed for automatic
--substitution of variables used in the program
--Due to the discovery of a serious bug emergency upgrade
--Copyright by Cngift 2002
//********************************************************
Class strswap{
Connectors used to connect variables when a variable is submitted in a get way
var $GetSplitStr = "&&";
var $TempArray = array ();
var $VariableArray = array ();
//********************************************************
--Program Name: Main ()
--Program Purpose: The default mode of operation of this class
--Incoming parameters: None
//********************************************************
function Main () {
Global $REQUEST _method;
if ("get" = = $REQUEST _method) {
$this->subgetstrtoarray ();
}
if ("POST" = = $REQUEST _method) {
$this->subpoststrtoarray ();
}
$this->globalvariable ();
}
//********************************************************
--Program Name: Subgetstrtoarray ()
--Program Purpose: The method that is invoked when a variable is committed in a get way
--Incoming parameters: None
//********************************************************
function Subgetstrtoarray () {
Global $QUERY _string;
$this->temparray = explode ($this->getsplitstr, $QUERY _string);
For ($i =0 $i <sizeof ($this->temparray); $i + +) {
//********************************************************
--Program Name: Subpoststrtoarray ()
--Program Purpose: The method that is invoked when a variable is submitted as a post
--Incoming parameters: None
//********************************************************
function Subpoststrtoarray () {
Global $_post;
Reset ($_post);
for ($i =0; $i <count ($_post); $i + +) {
//********************************************************
--Program Name: GlobalVariable ()
--Program Purpose: Declaring variables as global variables to facilitate other programs to call
--Incoming parameters: None
//********************************************************
function GlobalVariable () {
For ($i =0 $i <sizeof ($this->variablearray); $i + +) {
Global $ $this->variablearray[$i][0];
${$this->variablearray[$i][0]} = $this->variablearray[$i][1];
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.