PHP: //取得当前的二级目录名 $scriptFullPath = $_SERVER["PHP_SELF"]; $scriptArray = split("/",$scriptFullPath); $subPath = $scriptArray[sizeof($scriptArray)-2]; echo $subPath; 很难得哦...