Thanks for the tip!
But.... (you knew it was coming)
I am now getting error: Warning: Unable to open 'c:\windows\TEMP\php2' for reading: No such file or directory in C:\Inetpub\wwwroot\dyna_dev\fileuploadresult.php on line 4
Couldn't copy the file!
The name of the destination file is correct.
Where are these variables being set (I assume php.ini), and how can I configure them?
I dont think it's a configuration error in my "File Uploads" section, but I will include that just in case. The reason I dont think it's a problem in there is that everytime I change that configuration parameter and retry the upload, the error message is the same.
For the record:
I am on a Win98 system, using Personal Web Server, and PHP 4.0 (because newer versions have not worked with Win systems, but 4.0 reportedly does).
This is not my final production environment, but since my LINUX box is out of commission, it's all I can do for the moment...
;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;
file_uploads=On ; Whether to allow HTTP file uploads
upload_tmp_dir=\inetpub\wwwroot\uploadtemp ;temporary directory for HTTP uploaded files (will use system default if not specified)
upload_max_filesize=99999 ; Maximum allowed size for uploaded files
Also, for reference, here are the contents of each of the two files being used in this process.
--fileupload.php--
<head>
<title>Upload a File</title>
</head>
<body>
<h1>Upload a File</h1>
<form enctype="multipart/form-data" method="post" action="fileuploadresult.php">
<p><strong>File to Upload:</strong><br>
<input type="file" name="img1" size="30">
<P><input type="submit" name="submit" value="Upload File"></p>
</form>
</body>
--fileuploadresult.php--
<?
if ($img1_name != "") {
copy("$img1", "upload/$img1_name")
or die("Couldn't copy the file!");
} else {
die("No input file specified");
}
?>
<head>
<title>Successful File Upload!</title>
</HEAD>
<body>
<h1>Success!</h1>
<P>You sent: <? echo "$img1_name"; ?>, a <? echo "$img1_size"; ?>
byte file with a mime type of <? echo "$img1_type"; ?>.</p>
</body>