ftp_fput()

It uploads from an open file to the FTP server

Example

<?php

$fp = fopen(“test.txt”, ‘r’);

$ftpId = ftp_connect(‘ftp.phpcodez.com’);

$login_result = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);

ftp_fput($ftpId, “”test.txt””, $fp, FTP_ASCII)

ftp_close($ftpId);

fclose($fp);

?>