"; /* ./ 表示当前文件所在的目录 ../ 表示当前文件所在目录的上一级目录 */ include ("./includedfile.php"); echo ""; echo "绝对路径加载,__DIR__,方法一"; include(__DIR__."/includedfile.php"); echo ""; echo "绝对路径加载,\$_server['DOCUMENT_ROOT'],方法二"; echo "根目录:".$_SERVER['DOCUMENT_ROOT'].""; include($_SERVER['DOCUMENT_ROOT']."/includedfile.php"); ?>
$_SERVER: