PHP ftp_exec() May 14, 2012 Pramod T P It requests execution of a command on the FTP server Example <?php $ftpId = ftp_connect(‘ftp.phpcodez.com’); $login_result = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’); ftp_exec($ftpId, “ls”) or die(“Failed”); ftp_close($ftpId); ?>