Net_FTP::put()

Net_FTP::put() -- upload a file to the FTP server.

Synopsis

require_once 'Net/FTP.php';

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

Beschreibung

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

Parameter

Rückgabewert

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

Fehler-Meldungen

Several errors may be returned by put. 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' does not exist. The local file you specified does not exist. Correct the local file path.
Remote file '$remote_file' exists and may not be overwriten. The specified remote file exists but may not be overwritten. Maybe you don't have the permission to overwrite the file. Check the filepermissions.
File '$local_file' could not be uploaded to '$remote_file'. The upload of the local file failed. This may have several reasons: Maybe the local file does not exist or the remote directory you wanted to upload to does not exist or is not writeable.

Hinweise

Diese Methode kann nicht statisch aufgerufen werden.

Beispiel