|
|
|
ช่วยดูแก้ไฟล์ให้สามารถใช้แบบ globals off หน่อยค่ะ มันใช้บนโฮสไม่ได้อ่าค่ะ |
|
|
|
|
|
|
|
แทรกตัวนี้ครับ
Code (PHP)
<?
//*** Register Global =On/Off Function ***//
$phpVersion = phpversion();
list($v_Upper,$v_Major,$v_Minor) = explode(".",$phpVersion);
if (($v_Upper == 4 && $v_Major < 1) || $v_Upper < 4) {
$_FILES = $HTTP_POST_FILES;
$_ENV = $HTTP_ENV_VARS;
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_COOKIE = $HTTP_COOKIE_VARS;
$_SERVER = $HTTP_SERVER_VARS;
$_SESSION = $HTTP_SESSION_VARS;
$_FILES = $HTTP_POST_FILES;
}
if (!ini_get('register_globals')) {
while(list($key,$value)=each($_FILES)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_ENV)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_GET)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_POST)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_COOKIE)) $GLOBALS[$key]=$value;
while(list($key,$value)=each($_SERVER)) $GLOBALS[$key]=$value;
while(list($key,$value)=@each($_SESSION)) $GLOBALS[$key]=$value;
foreach($_FILES as $key => $value){
$GLOBALS[$key]=$_FILES[$key]['tmp_name'];
foreach($value as $ext => $value2){
$key2 = $key."_".$ext;
$GLOBALS[$key2]=$value2;
}
}
}
?>
Go to : PHP register_global = On/Off
|
|
|
|
|
Date :
2011-02-16 11:57:18 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
extract($_POST);
extract($_GET);
extract($_REQUEST);
|
|
|
|
|
Date :
2011-02-16 14:34:27 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|