// Upload a file. Linux + Apache + php3/4 passed the test. IIS test failed, win + Apache + PhP not tested
<? PHP
If ($ http_post_vars ["Upload"] = "Upload "){
File: // here you can add functions such as checking the file name, format, and image size,
File: // $ picurl full path of the Local System
File: // $ temporary file name after picurl_name upload
File: // $ picurl_size file size (in bytes)
File: // $ MIME type of the picurl_type File
Copy ("$ picurl", "/where/you/want/Put/The/uploaded/files/In/$ picurl_name ");
Exit;
}
?>
<Form action = "." method = "Post" enctype = "multipart/form-Data" name = "Ul">
<! -- Note: 'enctype = "multipart/form-Data" 'must be added here; otherwise
Transmission -->
<Input type = "file" name = "picurl" size = "15"
Accept = "image/X-PNG, image/GIF, image/JPEG">
<Input type = "Submit" name = "Upload" value = "Upload">
</Form>