예제 #1
0
파일: Sys.php 프로젝트: jbzoo/utils
 /**
  * Return document root
  *
  * @SuppressWarnings(PHPMD.Superglobals)
  * @return string
  */
 public static function getDocRoot()
 {
     $result = '.';
     $root = Arr::key('DOCUMENT_ROOT', $_SERVER, true);
     if ($root) {
         $result = $root;
     }
     $result = FS::clean($result);
     $result = FS::real($result);
     if (!$result) {
         $result = FS::real('.');
         // @codeCoverageIgnore
     }
     return $result;
 }