作者:Raak1
项目:subtitol
function ServerMapFolder($resourceType, $folderPath)
{
// Get the resource type directory.
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . strtolower($resourceType) . '/';
// Ensure that the directory exists.
CreateServerFolder($sResourceTypePath);
// Return the resource type directory combined with the required path.
return $sResourceTypePath . RemoveFromStart($folderPath, '/');
}
作者:LFS
项目:ora
function ServerMapFolder($resourceType, $folderPath)
{
// Get the resource type directory.
// $sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '\\' ;
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '/';
// Ensure that the directory exists.
CreateServerFolder($sResourceTypePath);
// Return the resource type directory combined with the required path.
// return $sResourceTypePath . str_replace( '/', '\\', RemoveFromStart( $folderPath, '/' ) ) ;
return $sResourceTypePath . RemoveFromStart($folderPath, '/');
}
作者:lonelywool
项目:hyperv
function ServerMapFolder($resourceType, $folderPath)
{
// Get the resource type directory.
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . strtolower($resourceType) . '/';
// Ensure that the directory exists.
$sErrorMsg = CreateServerFolder($sResourceTypePath);
if ($sErrorMsg != '') {
if (isset($GLOBALS['HeaderSent']) && $GLOBALS['HeaderSent']) {
SendErrorNode(1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})");
CreateXmlFooter();
exit;
} else {
SendError(1, "Error creating folder \"{$sResourceTypePath}\" ({$sErrorMsg})");
}
}
// Return the resource type directory combined with the required path.
return $sResourceTypePath . RemoveFromStart($folderPath, '/');
}
作者:golfcrseve
项目:scsupe
function CombinePaths($sBasePath, $sFolder)
{
return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
}