(2) upload.php---//brief description upload interface, user select File, Then submit it to submit.php. It is worth noting that a max_file_size is a hidden range, and by setting its value you can limit the size of the uploaded file. Program source Code <title>File Upload Form</title>
(3) submit.php---//brief description of the user upload files together with the basic information of the file to save the database//program source code
//////////////////////////////////////////////////////////////////////
The original can be used under the php5.0, now upload the file is always reported "you did not upload any files", the direct echo $myfile did not
Reply to discussion (solution)
Your program needs
Register_globals = On
and PHP 5.2 is the default
Register_globals = Off
The
and PHP 5.4 doesn't have this switch anymore.
$myfile should write $_files[' myfile ' [' Tmp_name ']
Other than that
$file _type = $_files[' myfile ' [' type '];
$file _name = $_files[' myfile ' [' name '];
$file _size = $_files[' myfile ' [' Size '];
Where it is not done, it is executed mutatis mutandis
Ok~ very grateful, is glob This parameter has a problem, thank you