PHP file upload code is a very instance PHP file upload code program, it can be used.
<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "content-type" content = "text/html; charset = gb2312"/>
<Title> php tutorial file upload code </title>
</Head>
<Body>
<Form method = "post" enctype = "multipart/form-data" action = "uploads. php">
<Input type = "file" name = "uploadedfile" size = "30">
<Input type = "hidden" name = "max_file_size" value = "100000">
<Input type = "submit" value = "Upload File">
</Form>
</Body>
</Html>
<? Php
If ($ uploadedfile <> "none "){
If (! Copy ($ uploadedfile, "$ uploadedfile_name ")){
Echo "<font face = 'arial' size = '2'> $ name File Upload Failed, <br> ";
Echo "or the file is too large <br> ";
Echo "Please use the back button to try again ";
} Else {
Echo "<font face = 'arial' size = '2'> the file is uploaded successfully! <Br> ";
Echo "file type: $ uploadedfile_type <br> ";
Echo "file size: $ uploadedfile_size <br> ";
Echo "File Name: $ uploadedfile_name <br> ";
Echo "file description: $ description <br> ";
}
}
/*
This is a very instance PHP file upload code program that can be used with it.
*/
?>