Net_FTP::execute() – executes a command on the server.


require_once 'Net/FTP.php';

mixed Net_FTP::execute ( string $command )


Executes a given command on the server (the SITE EXEC command is added by the method).


  • string $command - The command to be executed (without SITE EXEC).

Return value

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


The returned PEAR_Error object in case of an error is specific. There is only one errornumber which may occur. The message given by this error will contain the directory where the error occurred in "Execution of command '$command' failed". operation fails.


This function can not be called statically.


Using execute()


creates a new directory. (Previous) returns the last modification date of a file. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.