Net_FTP::putRecursive()

Net_FTP::putRecursive() -- upload a whole directory to the FTP server.

Synopsis

require_once 'Net/FTP.php';

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

Description

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

Parameter

Return value

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

Throws

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

Table 48-1. Possible PEAR_Error values

Error messageDescriptionSolution
Given local-path '$local_path' seems not to be a directory. The local path you have specified does not seem to be a directory. Correct the local directory path. (Does it end with '/'?)
Given remote-path '$remote_path' seems not to be a directory. The remote path you have specified does not seem to be a directory. Correct the local directory path. (Does it end with '/'?)

Note

This function can not be called statically.

Example