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