Archives

Posts Tagged ‘php file upload’

set_time_limit(0); //for huge files set time limit to zero that means unlimited. if(isset($_POST['button'])){ $ftp_config['server'] = ‘www.yahoo.com’; //ftp host $ftp_config['username'] = ‘batmunkh’; // ftp username $ftp_config['password'] = ‘mypass’; // ftp user password $ftp_config['web_root'] = ‘public_html’; //foldername from user home dir. $fileElementName = ‘userFile’; //file field name $conn_id = ftp_connect($ftp_config['server']); $ftp_login = ftp_login($conn_id,$ftp_config['username'],$ftp_config['password']); $file_upload_limit_size = (1024*1024*1025*100); if(!ftp_put($conn_id,$ftp_config['web_root'].’/’.$_FILES[$fileElementName]['name'],$_FILES[$fileElementName]['tmp_name'],FTP_BINARY)){ [...]

Aug 15th, 2009 | Filed under PHP