php獲取一些根目錄的方法
<?php
echo $_SERVER['PHP_SELF'];
echo "<BR>";
echo __FILE__;
echo "<BR>";
echo realpath("./");
echo "<BR>";
echo __DIR__;
echo "<BR>";
echo "<BR>";
define("ROOT",str_ireplace("Temp","",__DIR__));
echo ROOT;
更多信息請查看IT技術(shù)專欄