Exemplo n.º 1
0
 /**
  * Returns the physical file path that corresponds to the specified virtual path.
  * 
  * @param \string $path The virtual path in the application. 
  * 
  * @return \string
  */
 public static function MapPath($path)
 {
     $root = defined('MAIN_PATH') ? MAIN_PATH : $_SERVER['DOCUMENT_ROOT'];
     if ($path == NULL || $path === '') {
         return $root;
     }
     // $path = str_replace('\\', '/', $path);
     if (substr($path, 0, 1) == '~') {
         $path = $root . substr($path, 1, strlen($path) - 1);
     }
     return \Nemiro\Server::NormalizePathSeparators($path);
 }