Php file upload without any exception 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 foreach ($ _ FILES [imgs] [type] & nbsp; as & nbsp; $ k & gt; $ v) {if & nbsp; ($ v & nbsp; imagegif) & nbsp; | & nbsp; ($ v & nbsp; imagejpeg) & nbs for PHP file upload without any error prompt, but this file does not exist after file Upload
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.

Share To: $ v) {if? ($ V? ==? "Image/gif ")? |? ($ V? ==? "Image... 'data-pics =''>


------ Solution --------------------
Paste your form

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.