echo strpos($_SERVER['PHP_SELF'], '?') !== false ? substr($_SERVER['PHP_SELF'], 0, strpos($_SERVER['PHP_SELF'], '?')) : $_SERVER['PHP_SELF'];