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, '/'); }
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, '/'); }
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, '/'); }
function CombinePaths($sBasePath, $sFolder) { return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/'); }