Obtain the PHP code echo _ FILE __& nbsp;: & lt; p & gt ;. _ FILE __. & lt; p & gt; echodirname (_ FILE _) & nbsp;: & lt; p & gt ;. dirname (_ FILE __). & l obtain the PHP code of the absolute server path
Echo "_ FILE __:
". _ FILE __."
";
Echo "dirname (_ FILE __):
". Dirname (_ FILE __)."
";
Echo "\ $ _ SERVER ['document _ root']:
". $ _ SERVER ['document _ root']."
";
Echo "\ $ _ SERVER ['php _ SELF ']:
". $ _ SERVER ['php _ SELF ']."
";
Echo "dirname (\ $ _ SERVER ['php _ SELF ']):
". Dirname ($ _ SERVER ['php _ SELF '])."
";
Echo"
". $ _ SERVER ['document _ root']. dirname ($ _ SERVER ['php _ SELF '])."
";
Echo "realpath ('./'):
". Realpath ('./')."
";
$ PathInfo = pathinfo (_ FILE __);
Echo "pathinfo (_ FILE __, PATHINFO_DIRNAME ):
". $ PathInfo [dirname]."
";
Echo "pathinfo (_ FILE __, PATHINFO_BASENAME ):
". $ PathInfo [basename]."
";
Echo "pathinfo (_ FILE __, PATHINFO_EXTENSION]):
". $ PathInfo [extension]."
";
Echo "++ ++ ++ ";