本文整理汇总了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, '/');
}