Questions about uploading the file move_uploaded_file-php Tutorial

Source: Internet
Author: User
Question about uploading the file move_uploaded_file & lt ;? Php * & nbsp; * Createdon2012-1-18 & nbsp; * Tochangethetemplateforthisgeneratedfilegoto & nbsp; * Window-Preferences-PHPeclipse-upload file move_uploaded_file
/*
* Created on 2012-1-18
*
* To change the template for this generated file go
* Window-Preferences-PHPeclipse-PHP-Code Templates
*/




// If (isset ($ _ FILES ["upfile"]) {
// $ Upfile = $ _ FILES ["upfile"];
Error_reporting (0 );
$ Upfile = $ _ FILES ["upfile"];

$ Name = $ upfile ["name"];
$ Type = $ upfile ["type"];
$ Size = $ upfile ["size"];
$ Tmp_name = $ upfile ["tmp_name"];
Move_uploaded_file ($ tmp_name, 'upfile/'. $ name );

?> '


I want to know where the file is put after I click upload, how to set the file, and the file I uploaded cannot be found
Move_uploaded_file ($ tmp_name, 'upfile/'. $ name );


------ Solution --------------------
Create a new folder upfile in the same directory of the PHP file. the file you uploaded is saved in this folder according to your code.
Set write permissions for folders

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.