function removeFileFromEVENTS_FTP($sourceFile = '') { global $configArray; //define ("LOG_NONE", 0) ; // No log //define ("LOG_ECHO", 1) ; // Echo to screen //define ("LOG_HIDE", 2) ; // Echo to HTML comment <!-- --> //define ("LOG_FILE", 3) ; // Echo to file $ftp = new FTP($configArray['EventsFtpHost'], $configArray['EventsFtpUser'], $configArray['EventsFtpPass'], 0, 21, 1); $ftp->lcd($configArray['uploadDir']); $ftp->cd('events/uploads/'); if ($ftp->connected) { if (strlen($sourceFile) > 3) { $success = $ftp->del($sourceFile); } } //endif ftp->conected return $success; }