Beispiel #1
0
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, '/');
}
Beispiel #2
0
Datei: io.php Projekt: LFSF/oras
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, '/');
}
Beispiel #3
0
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, '/');
}
Beispiel #4
0
function CombinePaths($sBasePath, $sFolder)
{
    return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
}