<form action= "index.php Tutorial" method= "POST" enctype= "Multipart/form-data" >
Thumbnails: <input type= "file" name= "Files"/>
<input type= "Submit" value= "submitted"/>
PHP Processing Code
<?php
$temp _name = $_files[files][tmp_name]; Temporary file 3
$now _name = $_files[files][name]; Current File 4
Move_uploaded_file ($temp _name, './images/'. Date (' Yyyymdhis '). $now _name); Move to the specified folder below
?>
The Move_uploaded_file () function moves the uploaded file to a new location.
If successful, returns TRUE, otherwise returns false.
Grammar
Move_uploaded_file (file,newloc) parameter description
File required. Specify the files to be moved.
Newloc required. Specify a new location for the file.
Description
This function checks to make sure that files specified by file are valid uploads (that is, uploaded via Php's http post upload mechanism). If the file is valid, it is moved to the file specified by Newloc.
If file is not a legitimate upload file, no action occurs, Move_uploaded_file () returns false.
If file is a legitimate upload, but cannot be moved for some reason, Move_uploaded_file () will return false and a warning will be issued.
This check is particularly important if the uploaded file is likely to cause the content to be displayed to users or other users of the system.