If PHP_SELF is empty, use REQUEST_URI when determining pagenow.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-29 02:33:25 +00:00
parent 138f2e6a91
commit b62211209a
1 changed files with 3 additions and 0 deletions

View File

@ -2,6 +2,9 @@
// On which page are we ?
$PHP_SELF = $_SERVER['PHP_SELF'];
if ( empty($PHP_SELF) )
$PHP_SELF = $_SERVER["REQUEST_URI"];
if (preg_match('#([^/]+.php)#', $PHP_SELF, $self_matches)) {
$pagenow = $self_matches[1];
} else if (strstr($PHP_SELF, '?')) {