PHP ftp_exec() Function

The ftp_exec() function requests for execution of a command on the FTP server.

bool ftp_exec ( resource $ftp_stream , string $command )

Sends a SITE EXEC command request to the FTP server

Example -

ParameterDescription
ftp_streamThe link identifier of the FTP connection
commandThe command to execute

Returns TRUE if the command was successful (server sent response code: 200); otherwise returns FALSE