Hey guys. I just heard of PHP yesterday, lol, but I'm trying to make a script for a submit button on my form using FTP. My goal is to allow someone to upload a very big file to a specific folder on my server. Using the script that I have, all files that are < 2M are received on the server, but anything > 2M and I get a 'File cannot be empty' error and no transfer. Is PHP FTP the correct choice for me? And how to I get it to allow larger files of any kind, like videos, pictures, docs, etc.? Thanks for you help! Below is my script for the button (which is on another webpage).
<?php
//change these values to suit your site
$ftp_user_name='********';
$ftp_user_pass='*******';
$ftp_server='ftp.mysite.com';
$ftp_dir='Uploads/';
//build a fully qualified (FTP) path name where the file will reside
$destination_file=$ftp_dir.$_FILES['File'] ['name'];
// connect, login, and transfer the file
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$upload = ftp_put($conn_id, $destination_file, $_FILES['File'] ['tmp_name'], FTP_BINARY);
//use ftp_site to change mode of the file
//this will allow it be visible by the world,
$ch=ftp_site($conn_id,"chmod 777 ".$destination_file);
// close the FTP stream
ftp_close($conn_id);
//end if
?>