Php local attachment uploaded successfully, server failed, prompt not to select File

Source: Internet
Author: User
Php: The local attachment is uploaded successfully, the server is not successful, and the system prompts that the file is not selected. 1. I have set iis6 Upload file restrictions. ASPMaxRequestEntityAllowed to change it to the required value (20480000)
2. the php. ini settings are as follows, but the upload is still unsuccessful. let's talk about what is wrong or what is missing (note: the upload is successful if the size is smaller than 8 MB)

[PHP]

Max_execution_time = 600; Maximum execution time of each script, in seconds
Max_input_time = 600; Maximum amount of time each script may spend parsing request data
; Max_input_nesting_level = 64; Maximum input variable nesting level
Memory_limit = 128 M; Maximum amount of memory a script may consume (128 MB)
Post_max_size = 50 M

; Whether to allow HTTP file uploads.
File_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; Specified ).

Upload_tmp_dir = "C:/PHP/tmp"

; Maximum allowed size for uploaded files.
Upload_max_filesize = 30 M


; Maximum number of files that can be uploaded via a single request
Max_file_uploads = 30


Reply to discussion (solution)

Can I check the error message?

What is the error message?
Echo $ _ FILES ['file'] ['error']; check it out.

What is the error message?
Echo $ _ FILES ['file'] ['error']; check it out.


There is no error message at all. In the end, only the file is not selected, and it is smaller than 8 MB.

What is the error message?
Echo $ _ FILES ['file'] ['error']; check it out.


There is no error message at all. In the end, only the file is not selected, and it is smaller than 8 MB.

You may have corrected the file.
Restart IIS after modification.

Paste your Upload code


What is the error message?
Echo $ _ FILES ['file'] ['error']; check it out.


There is no error message at all. In the end, only the file is not selected, and it is smaller than 8 MB.


Can it be smaller than 8 MB? The limit is obviously exceeded. It should have nothing to do with the program, but there is a problem with the prompt information written in this program.
Correct the configuration file. Use the phpinfo function to check which configuration file is used.



What is the error message?
Echo $ _ FILES ['file'] ['error']; check it out.


There is no error message at all. In the end, only the file is not selected, and it is smaller than 8 MB.


Can it be smaller than 8 MB? The limit is obviously exceeded. It should have nothing to do with the program, but there is a problem with the prompt information written in this program.
Correct the configuration file. Use the phpinfo function to check which configuration file is used.



Brother, you are right. the phpinfo function shows that the configuration file has been changed incorrectly. Paste

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.