if you want to upload the file on server and thn do delete it.. this script works well
<?php
$web = '111.111.111.111';
$user = '123abc';
$pass = 'abc123';
$server_file = '/public_html/upload/test.csv';
$local_file = 'test.csv';
$conn_id = ftp_connect($web);
$login_result = ftp_login($conn_id,$user,$pass);
if (ftp_put($conn_id, $server_file, $local_file, FTP_BINARY))
{echo "Success \n";}
else {echo "Failed";}
if (ftp_delete($conn_id, $server_file)) {
echo "$server_file deleted successful\n";
} else {
echo "could not delete $server_file\n";
}
ftp_close($conn_id);
?>