in my browser after browsing for a file and submitting it:
File upload script
path: C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Winter.jpg
name:
size: bytes
type:
Still busy with the tutorial book. Now I'm getting double slash URL out of my upload script and don't know why.
<html>
<head>
<title>File upload Script</title>
</head>
<b>
File upload script<br><br>
</b>
<?php
$file_dir="/home/matt/htdocs/uploads";
$file_url="http://80-www.corrosive.co.uk.proxy.lib.uiowa.edu/matt/uploads";
$fupload=$POST["fupload"];
$fupload_name=$POST["fupload_name"];
$fupload_size=$POST["fupload_size"];
$fupload_type=$POST["fupload_type"];
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<br>\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 enctyp="multipart/form-data" action="<?print $PHP_SELF?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="51200">
<input type="file" name="fupload"><br>
<input type="submit" value="Send File!">
</form>
</body>
</html>
Thanks ahead of time for your insight.