Net_FTP::get()

Net_FTP::get() -- download a file to the computer your script runs on.

Synopsis

require_once 'Net/FTP.php';

mixed Net_FTP::get (string $remote_file, string $local_file [, bool $overwrite = false [, int $mode = null]])

Beschreibung

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

Parameter

Rückgabewert

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

Fehler-Meldungen

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

Tabelle 49-1. Mögliche Fehler-Arten

Error messageDescriptionSolution
Local file '$local_file' exists and may not be overwriten. The local file you specified exists and you did not specify to overwrite it. Set parameter $overwrite = true.
Local file '$file' is not writeable. Can not overwrite. You specified to overwrite the localfile. This did not work. Maybe you don't have the permission to overwrite the file. Check the filepermissions.
File '$remote_file' could not be downloaded to '$local_file'. The download of the remote file failed. This may have several reasons: Maybe the remote file does not exist or the local directory you wanted to download to does not exist or is not writeable.

Hinweise

Diese Methode kann nicht statisch aufgerufen werden.

Beispiel