From 8501d5771a984d17871b7d02c605bd7b5af3ce54 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 26 Jun 2012 04:55:33 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=B8=E5=85=B3=E6=B3=A8?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/proftp.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/proftp.php b/tools/proftp.php index 188af51a..f85290dc 100644 --- a/tools/proftp.php +++ b/tools/proftp.php @@ -5,9 +5,9 @@ die("Error in connection: " . pg_last_error()); } //安全检查:只接受来自westdc.westgis.ac.cn的访问 - if($_SERVER['HTTP_CLIENT_IP']){ + if(@$_SERVER['HTTP_CLIENT_IP']){ $onlineip=$_SERVER['HTTP_CLIENT_IP']; - }elseif($_SERVER['HTTP_X_FORWARDED_FOR']){ + }elseif(@$_SERVER['HTTP_X_FORWARDED_FOR']){ $onlineip=$_SERVER['HTTP_X_FORWARDED_FOR']; }else{ $onlineip=$_SERVER['REMOTE_ADDR']; @@ -15,8 +15,8 @@ if ($onlineip!='210.77.68.241') die("error! You are not permitted to visit this page."); //文件生成 - $onlineappid=(int)$_GET['onlineappid']; - $offlineappid=(int)$_GET['offlineappid']; + $onlineappid=(int)@$_GET['onlineappid']; + $offlineappid=(int)@$_GET['offlineappid']; if (!($onlineappid>0 || $offlineappid>0)) { die("Error in parameter.");