// 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>