本文整理匯總了PHP中RemoveFromEnd函數的典型用法代碼示例。如果您正苦於以下問題:PHP RemoveFromEnd函數的具體用法?PHP RemoveFromEnd怎麽用?PHP RemoveFromEnd使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了RemoveFromEnd函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetUrlFromPath
function GetUrlFromPath( $resourceType, $folderPath )
{
if ( $resourceType == '' )
return RemoveFromEnd( $GLOBALS["UserFilesPath"], '/' ) . $folderPath ;
else
return $GLOBALS["UserFilesPath"] . strtolower( $resourceType ) . $folderPath ;
}
示例2: GetUrlFromPath
function GetUrlFromPath($resourceType, $folderPath)
{
if ($resourceType == '') {
return RemoveFromEnd($GLOBALS["UserFilesPath"], '/') . $folderPath;
} else {
return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath;
}
}
示例3: GetUrlFromPath
function GetUrlFromPath($resourceType, $folderPath, $sCommand)
{
$rpath = GetResourceTypePath($resourceType, $sCommand);
$rpath = RemoveFromEnd($rpath, "/");
$path = CombinePaths($rpath, "");
$path = RemoveFromEnd($path, "/");
return $path;
}
示例4: GetUrlFromPath
/**
* 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;
}
示例5: CombinePaths
function CombinePaths($sBasePath, $sFolder)
{
return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
}