PHP cannot upload large files to display Filecouldn 'tbemoved solution _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
PHP cannot upload a large file to display Filecouldntbemoved. Is doing a file Upload shared site, want to achieve the file upload function through the following code: formenctypemultipartform-dataactionadd_file.phpmethodpostfieldsetlegendFilloutt is doing a file Upload shared site, want to achieve the file upload function through the following code:

It is found that when uploading a slightly larger File, the File couldn't be moved. but the database displays the File name, not the size. When a file larger than 8 MB is uploaded, the page does not respond. I searched the internet and found an article on "PHP Upload summary" on feino. The article points out that php file upload is affected by the following settings of php. ini:

Post_max_size
Upload_max_filesize
Max_execution_time
Memory_limit

So I found php. ini under/etc/php5/apache2/and searched post_max_size to change its default value to 125 M. I searched for upload_max_filesize and changed its default value to 125 M. then I saved it. Enter apache2ctl-k restart on the terminal to restart apache. The problem is solved! You can upload large files on the page ~

Terraform enctype = multipart/form-data action = add_file.php method = post fieldsetlegendFill out t...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.