I am trying to get a file upload to work and am having problems. I am doing the same thing that I did in previous pages on file uploading that worked and still works. In my form I have the following:
<input type='file' name='frmAdd' size='20'><input type='hidden' name='MAX_FILE_SIZE' value='1000000'>
In my script I have this:
$MessageDetails["AddressFile"] = $frmAdd;
$tmp_file = $MessageDetails["AddressFile"];
$new_file = "/data/massmail/address/" . $MessageDetails["SaveAsDate"] . $MessageDetails["SaveAsName"];
if (copy($tmp_file, $new_file)) {
unlink($tmp_file);
}
When the script executes I get the following error:
Warning: Unable to open 'C:\addresslist.txt' for reading: No such file or directory in processing.php3 on line 7
(The copy line)
A phpinfo() that outputs later on the page shows the following for the file field:
HTTP_POST_VARS["frmAdd"] C:\addresslist.txt
It does not show the name, size, or _type variables for the field and if I remember right from previous experience the frmAdd should actually be some temp file (i.e. /tmp/file123).
I am using php 3.0.16 and the browser is IE 5.
Thanks