protected function getExistingPath($path)
    {
        $numberOfSlashes = substr_count($path, '/');
        $existingPath = $path;
        
        for ($i = 0; $i < $numberOfSlashes; $i++) {
            if (!file_exists($existingPath)) {
                $existingPath = dirname($existingPath);
            }
        }
        
        return $existingPath;
    }
protected function getExistingPath($path)
    {
        $numberOfSlashes = substr_count($path, '/');
        $existingPath = $path;
        
        for ($i = 0; $i < $numberOfSlashes; $i++) {
            if (!file_exists($existingPath)) {
                $existingPath = dirname($existingPath);
            }
        }
        
        return $existingPath;
    }
protected function getExistingPath ( $ path ) { $ numberOfSlashes = substr_count ( $ path , '/' ) ; $ existingPath = $ path ; for ( $ i = 0 ; $ i < $ numberOfSlashes ; $ i ++ ) { if ( ! file_exists ( $ existingPath ) ) { $ existingPath = dirname ( $ existingPath ) ; } } return $ existingPath ; }
Returns the existing part of a path

@access protected
@param string $path
@return string
Returns the existing part of a path