I had a little trouble getting the ftp_put to work, because of that particular server. All variables and data parsed from the previous web form had to be retreived using $_POST, $_GET or $_FILES.
If you don't know what you sent use phpinfo(); to display what the server thinks about your data.
so...when sending files using a form and PHP, make sure that all the data (text files etc...) are retreived with $_POST, and files (smiley.png, compression.zip, etc...) are retreived with $_FILES.
here's what your start of a results.php file might look like:
<?PHP
$myName = $_POST['name']; $myFile = $_FILES['file_name']; ?>
Now when it comes to transmitting that information...
<?PHP
$destination_path = "src/bin/";
$destination_file = $destination_path."img.jpg";
$file = $myFile['tmp_name'];
$upload = ftp_put($conn_id, $destination_file, $file, FTP_BINARY);if (!$upload) {echo "FTP upload of $destination_file has failed!";
} else {
echo "Uploaded $file to $conn_id as $destination_file";
}
?>
hope this is usefull ^_^