>>455
間違えた
preg_replace('/\/[^\/]*$/', '', $_SERVER["SCRIPT_NAME"]);