简体   繁体   中英

php - Split large files to smaller chunks for uploading

I am making a website for uploading large video files using PHP. But the problem is that i get (ERR_CONNECTION_RESET) error while uploading large files which take more time to upload. It works fine for small files (less than 80-90mb) which take less time to upload. I have added these lines to my user.ini file but still nothing.

max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
post_max_size = 1024M
upload_max_filesize = 1024M

Is there a way to break large files into smaller pieces which can be uploaded without this timeout error or is there any other better way for uploading large files.

you can use split command in Linux

https://linux.die.net/man/1/split

First i recommended you to use any FTP program, i used to upload big files via it, with no problems to me :)

Or use this PHP function to make unlimited execution time between you and the website, set_time_limit(0);

Or split the files via Winrar and unzip it on the server.

I hope this helps you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM