This is a new handwritten Upload File. After some problems are solved, the file can be uploaded completely and any type is supported.
<Form action = "form. php Tutorial" method = "post" enctype = "multipart/form-data">
<Input type = "hidden" name = "MAX_FILE_SIZE" value = "100000000">
<Input type = "file" name = "spic"> <br>
<Input type = "submit" name = "sub" value = "upload file"> <br>
<? Php
If (is_uploaded_file ($ _ FILES ['spic '] ['tmp _ name']) {
Echo "<pre> ";
Print_r ($ _ FILES );
Move_uploaded_file ($ _ FILES ['spic '] ['tmp _ name'], $ _ FILES ['spic'] ['name']);
Echo "uploaded successfully ";
Echo "</pre> ";
}
?>
</Form>
During the running process, you can find a file as follows:
Array
(
[Spic] => Array
(
[Name] => IMG_0044.JPG
[Type] => image/jpeg
[Tmp_name] => F: TempphpF695.tmp
[Error] => 0
[Size] = & gt; 3737804
)
)