Results 1 to 3 of 3
Thread: Upload 2 MB
Hybrid View
-
10th January 2008 21:43 #1
Upload 2 MB
!
:
, - 2 ,! , ! , upload FTP . upload ajax, ?Code:<?php $ftp_server = "172.16.2.1"; $ftp_user_name = "xxxx"; $ftp_user_pass = "xxxx"; if (!isset($destdir)) { $destdir = "/"; } if ($op=="upload") { if ($_FILES['userfile']['size'] > 0) { $destination_file=$destdir.$_FILES['userfile']['name']; $source_file=$_FILES['userfile']['tmp_name']; $conn_id = ftp_connect($ftp_server); if (!$conn_id) { echo "Cannot connect FTP server"; } $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); if (!$login_result) { echo "FTP connection has failed!<br/>"; echo "Attempted to connect to ".$ftp_server." for user ".$ftp_user_name."<br/>"; die(0); // i } else { echo "Connected to ".$ftp_server.", for user :".$ftp_user_name."<br/>"; $upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY); if (!$upload) { // i?iaa?yaaia aaee a iaoniaoai upload-a echo "FTP upload has failed!<br/>"; } else { echo "Uploaded ".$source_file." to ".$ftp_server." as ".$destination_file."<br/>"; } ftp_close($conn_id); } echo "<a href='?op='>back to form</a><br/>"; } } else { ?> <table align="center"> <form enctype="multipart/form-data" action="?op=upload" method="post"> <tr> <td align="right">Upload file: </td> <td><input name="userfile" type="file" /></td> </tr> <tr> <td align="right">Destination dir: </td> <td><input name="destdir" type="text" size="35"/></td> </tr> <tr> <td align="right"> </td> <td><input type="submit" value="Send file"/></td> </tr> </form> </table> </pre> <?php } ?>
!
-
11th January 2008 02:25 #2
http://www.radinks.com/upload/config.php .htaccess :
Code:php_value upload_max_filesize 16M php_value post_max_size 20M
-
11th January 2008 19:13 #3
, HTTP , . , php.ini. , :
upload_max_filesize = 2M
post_max_size = 8M
.
hidden MAX_FILE_SIZE, :
<input type="hidden" name="MAX_FILE_SIZE" value="2000000" />
, value .EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in