Example #1
0
 /**
  * Get abstract file url
  *
  * @deprecated
  * @param string $file file path
  * @return string Converted file path
  */
 function getAbsFileUrl($file)
 {
     $file = Context::normalizeFilePath($file);
     if (strpos($file, './') === 0) {
         $file = dirname($_SERVER['SCRIPT_NAME']) . '/' . substr($file, 2);
     } elseif (strpos($file, '../') === 0) {
         $file = Context::normalizeFilePath(dirname($_SERVER['SCRIPT_NAME']) . "/{$file}");
     }
     return $file;
 }