How to implement php large file upload? This post was last edited by xq_blessing at 09:01:11
For example, a video website wants users to share their own videos (the size is limited to 1 GB ).
Thanks for the code ~
Reply to discussion (solution)
PHP + flash Upload
How does one implement video Upload like youku?
Upload_max_filesize and post_max_size
Http://www.howareyou.org.cn /? P = 162
Modify the related parameters of php. ini. it is still possible to use 2 GB files in php as files.
I don't know what kind of website the landlord wants to do.
Flash can't be used.
If it is only for some internal personnel, use ftp directly.
If ls is too large, ftp is better.
For example, a video website wants users to share their own videos (the size is limited to 1 GB ).
Thanks for the code ~
The traditional HTML method is difficult to upload large files. In other words, it is 100 MB. 50 MB is very large for the server. the service not only requires a dedicated link to wait for the file to be uploaded, allocate the memory of the same lady to save the file, which is quite stressful for the server. Even if Flash is used, Flash does not support resumable Upload and file multipart Upload. Flash works the same way as traditional HTML Upload. When uploading MB images in Flash, the server also needs to allocate MB of memory. If 10 users Upload MB of data at the same time, they need to eat 1 GB of memory on the server.
Some friends have tried to use the Flash file upload control to upload large files, but they often encounter Upload timeout or upload errors. This is because the current Flash file upload control uses the same technology as the traditional HTML Upload method. The multipart Upload technology is not used. this traditional HTML Upload method requires the server to open a SOCKET connection until the Flash upload is complete. This may cause a lot of pressure on the server in the case of high concurrency, because the website has a large volume of traffic, the user uploads a large number of files, the server cannot be a user for a long time. All requests are processed in the shortest time.
Like the large attachment Upload function in QQ mail, the ultra-large attachment Upload control in 115 network disk, Huawei network disk (DBank), and Kingsoft fast disk all use controls to upload ultra-large files. In this way, the server load is reduced, the server memory is saved, and the user experience is improved.
If it is only for some internal personnel, use ftp directly.
Most people can also use ftp. ftp to install extended write scripts to Support Databases. of course, this poses an additional security risk.
For example, a video website wants users to share their own videos (the size is limited to 1 GB ).
Thanks for the code ~
There is a Web large file breakpoint Upload control: http://www.cnblogs.com/xproer/archive/2012/05/29/2523757.html
This control supports resumable Upload of GB files, provides complete development documents, supports MD5 verification of files, and supports batch upload of files.
Paste a file to simplify file selection:
File MD5 value calculation progress:
File MD5 value calculated
The server checks whether the same file exists based on MD5.
Resume file transfer
Load the file list from the server
Uploading files
File uploaded
Upload folder
And Discuz! X2 integration-the breakpoint resume control is installed in the background
And Discuz! X2 integration-enable the breakpoint resume control in the background
And Discuz! X2 integration-the background breakpoint resume control is enabled successfully.
And Discuz! X2 integration-frontend posting page
And Discuz! X2 integration-Upload
Sample code for page call:
HTTP breakpoint control and MySQL database demo page (UTF-8)