Php file upload without any error prompt, but this file does not exist after file Upload

Source: Internet
Author: User
Tags php file upload
Php file upload without any error prompt, but the file does not have the file foreach ($ _ FILES ['imgs '] ['type'] as $ k => $ v ){
If ($ v = "image/gif") | ($ v = "image/jpeg ") | ($ v = "image/pjpeg ")))
{
If ($ _ FILES ["imgs"] ["error"] [$ k] = 0)
{
$ Fname = md5 ($ _ FILES ["imgs"] ["name"] [$ k]). '. '. pathinfo ($ _ FILES ["imgs"] ["name"] [$ k], PATHINFO_EXTENSION );
Move_uploaded_file ($ _ FILES ["imgs"] ["tmp_name"] [$ k], $ fname );
}
}
Else
{
Echo "Invalid file ";
}

}

No error message... The location of $ _ FILES ["imgs"] ["tmp_name"] is C: \ WINDOWS \ php2EF. tmp, but no file found in this location .... I used to upload files. it's strange that this is not the case. There is also the winxp system of the local website.


Reply to discussion (solution)

C: \ does WINDOWS have anonymous user access?
You 'd better specify upload_tmp_dir

C: \ does WINDOWS have anonymous user access?
You 'd better specify upload_tmp_dir
I have specified whether D: \ php2EF. tmp is displayed.

How many Upload controls do you have?

How many Upload controls do you have?

One has tried multiple of them.
I use the multiple-choice method to obtain the object. the obtained object is move_uploaded_file. if it is not mentioned as an error, no file is uploaded.

Paste your form

Paste your form

In addition, I can upload only one 1 non-repeating file in the standard format .... I was wondering if there was a problem with apache and PHP configuration.

Paste your form
Is_uploaded_file is also false. I don't know why.

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.