Exemplo n.º 1
0
Arquivo: Sys.php Projeto: 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;
 }