예제 #1
0
 public static function formatPath($miniphpyRootPath, $path)
 {
     $currInput = str_replace("~/", "./", $path);
     // Insert root path to input path if it is given
     if (isset($miniphpyRootPath)) {
         $currInput = str_replace("./", $miniphpyRootPath, $currInput);
     }
     // Is relative path, no URL and root path is set
     if (isset($miniphpyRootPath) && $miniphpyRootPath != "" && LittleHelpers::isAbsolutePath($currInput) == false && LittleHelpers::isValidUrl($currInput) == false) {
         $currInput = $miniphpyRootPath . DIRECTORY_SEPARATOR . $currInput;
     }
     return $currInput;
 }