修正判断不完全的问题

This commit is contained in:
祁宁 2014-08-18 20:39:36 +08:00
parent 9a3949247d
commit 3041d50461

View File

@ -67,7 +67,10 @@ if (!empty($_GET) || !empty($_POST)) {
}
$parts = parse_url($_SERVER['HTTP_REFERER']);
if($parts['port'] != 80) $parts['host'] = "{$parts['host']}:{$parts['port']}";
if (!empty($parts['port']) && $parts['port'] != 80) {
$parts['host'] = "{$parts['host']}:{$parts['port']}";
}
if (empty($parts['host']) || $_SERVER['HTTP_HOST'] != $parts['host']) {
exit;
}