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