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.");