always use forward slash
function GetParentFolder( $folderPath )
{
$sPattern = "-[/\\\\][^/\\\\]+[/\\\\]?$-" ;
return preg_replace( $sPattern, '', $folderPath ) ;
}
function GetParentFolder( $folderPath )
{
$sPattern = "-/[^/]+/?$-" ;
return preg_replace( $sPattern, '', $folderPath ) ;
}
