Net_FTP::getRecursive()

Net_FTP::getRecursive() -- download a whole directory to the computer your script runs on.

Synopsis

require_once 'Net/FTP.php';

mixed Net_FTP::getRecursive (string $remote_path, string $local_path [, bool $overwrite = false [, int $mode = null]])

Description

This downloads a whole directory from the FTP server to the computer your script runs on.

Paramètres

Valeur retournée

mixed - true on success, otherwise PEAR::Error.

Valeurs renvoyées

Several errors may be returned by getRecursive. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are:

Tableau 49-1. Valeurs PEAR_Error possibles

Error messageDescriptionSolution
Given remote-path '$remote_path' seems not to be a directory. The path you specified on the FTP sever seems not to be a valid directory node. Maybe your path does not end with '/' or the directory does not exist.
Given local-path '$local_path' seems not to be a directory. The path you specified on the local host seems not to be a valid directory node. Maybe your path does not end with '/' or the directory does not exist.
Could not create dir '$local_path'. The given directory could not be created. Check your permissions on the source-directory.
Could not create dir '$local_path'. The given directory could not be created. Check your permissions on the source-directory.

Note

Cette fonction ne peut pas être appelée de façon statique.

Exemple