php RemoveFromEnd类(方法)实例源码

下面列出了php RemoveFromEnd 类(方法)源码代码实例,从而了解它的用法。

作者:rhertzo    项目:lc   
function GetUrlFromPath( $resourceType, $folderPath )
{
    if ( $resourceType == '' )
        return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
    else
        return $GLOBALS["UserFilesPath"] . strtolower( $resourceType ) . $folderPath ;
}

作者:LFS    项目:ora   
function GetUrlFromPath($resourceType, $folderPath)
{
    if ($resourceType == '') {
        return RemoveFromEnd($GLOBALS["UserFilesPath"], '/') . $folderPath;
    } else {
        return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath;
    }
}

作者:aazhb    项目:ArtCm   
function GetUrlFromPath($resourceType, $folderPath, $sCommand)
{
    $rpath = GetResourceTypePath($resourceType, $sCommand);
    $rpath = RemoveFromEnd($rpath, "/");
    $path = CombinePaths($rpath, "");
    $path = RemoveFromEnd($path, "/");
    return $path;
}

作者:span2    项目:Kalla   
/**
 * 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;
}

作者:golfcrseve    项目:scsupe   
function CombinePaths($sBasePath, $sFolder)
{
    return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
}


问题


面经


文章

微信
公众号

扫码关注公众号