Fix #1321 Multipage doesn't work if portal.php is renamed

Fix #1321 Multipage doesn't work if portal.php is renamed
I think this is better than `$_SERVER['PHP_SELF']`.