コード例 #1
0
ファイル: io.php プロジェクト: Raak15/subtitols
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, '/');
}
コード例 #2
0
ファイル: io.php プロジェクト: 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, '/');
}
コード例 #3
0
ファイル: io.php プロジェクト: lonelywoolf/hypervm
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, '/');
}
コード例 #4
0
ファイル: io.php プロジェクト: golfcrseven/scsuper
function CombinePaths($sBasePath, $sFolder)
{
    return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
}