ftp image uploading problem
Posted: Sun Jun 12, 2005 2:59 pm
I am having a problem uploading image files using php. im using the file type input.
Here's the code
It uploads the picture but it has 0 bytes.
Here's the code
Code: Select all
$destination_file="/pics2/thumb".$id.".jpg";
$destination_file2="/pics2/large".$id.".jpg";
// upload the file
$upload = ftp_put($conn_id, $destination_file, $_FILES['thumb'], FTP_BINARY);
$upload2= ftp_put($conn_id, $destination_file2, $_FILES['largepic'], FTP_BINARY);
// check upload status
if (!$upload) {
echo "FTP upload has failed!";
} else {
echo "Uploaded $source_file to $ftp_server as $destination_file";
}
// close the FTP stream
ftp_close($conn_id);