function GetUrlFromPath( $resourceType, $folderPath ) { if ( $resourceType == '' ) return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ; else return $GLOBALS["UserFilesPath"] . strtolower( $resourceType ) . $folderPath ; }
function GetUrlFromPath($resourceType, $folderPath) { if ($resourceType == '') { return RemoveFromEnd($GLOBALS["UserFilesPath"], '/') . $folderPath; } else { return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath; } }
function GetUrlFromPath($resourceType, $folderPath, $sCommand) { $rpath = GetResourceTypePath($resourceType, $sCommand); $rpath = RemoveFromEnd($rpath, "/"); $path = CombinePaths($rpath, ""); $path = RemoveFromEnd($path, "/"); return $path; }
/** * GetUrlFromPath * Modified by Tibcsi for iShark CMS * * @param mixed $resourceType * @param mixed $folderPath * @access public * @return void */ function GetUrlFromPath($resourceType, $folderPath) { global $libs_dir; $ldir = preg_quote($libs_dir, '!'); $akt_dir = preg_replace("!/{$ldir}/.*!", '/' . trim($GLOBALS["UserFilesPath"], '/'), $_SERVER['PHP_SELF']); if ($resourceType == '') { // $ret = $akt_dir . $folderPath; $ret = RemoveFromEnd($GLOBALS["UserFilesPath"], '/') . $folderPath; } else { // $ret = $akt_dir . '/' . $resourceType . $folderPath; $ret = $GLOBALS["UserFilesPath"] . $resourceType . $folderPath; } // $f = fopen('/home/tibor/public_html/www.medikemia.hu/files/teszt.log', 'a'); // fwrite($f, "Url: $ret\n"); // fclose($f); return $ret; }
function CombinePaths($sBasePath, $sFolder) { return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/'); }