Sun Oct 26, 2008 9:35 pm
<html>
<head>
<title>A file upload script</title>
</head>
<?php
$file_dir = ".";
$file_url = ".";
if ( isset( $fupload ) ){
print "path: $fupload<br>\n";
print "name: $fupload_name<br>\n";
print "size: $fupload_size bytes<br>\n";
print "type: $fupload_type<p>\n\n";
if ( $fupload_type == "image/gif" ){
copy ( $fupload, "$file_dir/$fupload_name") or die ("Couldn't copy");
print "<img src=\"$file_url/$fupload_name\"><p>\n\n";
}
}
?>
<body>
<form enctype="multipart/form-data" action="<?php print $PHP_SELF?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
<input type="file" name="fupload">
<input type="submit" value="Send file!">
</form>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.