hmmm, I used to get this.
Though I was using Win98 to upload to my server, Unix.
This is the script I got and edited...
<BODY>
<?
if (isset ($users_file)) {
echo "<B>Remote File Name:</B>$users_file<BR>";
echo "<B>Local File Name:</B> $users_file_name<BR>";
echo "<B>Local File Size:</B> $users_file_size<BR>";
if (isset ($users_file_type)) {
echo "<B>Local File Type:</B> $users_file_type<P>";
}
// Change $doc_directory to your 'DocumentRoot'.
$doc_directory = "";
$my_file = "".$users_file_name;
$copy_path = $doc_directory.$my_file; if ($users_file != "none") {
if(!copy ($users_file, $copy_path)) {
echo "File upload failed!";
}
else {
?>
<A HREF="<? echo $my_file; ?>">Upload Complete!</A> <?
}
}
else {
echo "<P>You must select a file to upload!<P>"; ?>
<A HREF="<? echo $PHP_SELF; ?>"><B>Back</B></A> to the Upload Form
<?
}
} else {
?>
<FORM ACTION="<?
echo $PHP_SELF;
?>"
ENCTYPE="multipart/form-data" METHOD="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="20000">
<INPUT TYPE="file" NAME="users_file"><BR> <INPUT TYPE="submit" VALUE="Upload!"> </FORM>
<? } ?>
</BODY>
I've set it up to work inside the same directory, so put it in something like /public_html/test/ then go to www.mysite.com/test/upload.php (or whatever you called it) and try to upload something, it works for all files I've tried. Obviously you'll need to add to it to limit file sizes and types that can be uploaded, and using .htaccess or some other security on the directory is a must. Especially until you limit upload of things like, say a php file containing a drop db command, that could kinda muck up ya day!
(Though as in my post 5 mins ago .htaccess isn't my strong point!)