First off, sorry about what must have been quite the disaster. May it be a lesson learned for the rest of us developers to backup diligently.
Here's my problem: I'm a newbie to PHP, and I'm trying to build a script to upload files. I've followed every example to the T, but I just can't get the damn thing working. If anyone can throw some help my way, I would greatly appreciate it.
Thanks! Scott
My system is NT4 / IIS4 / PHP4
The code is as follows:
<BODY BGCOLOR=FFFFFF>
<?
if ($file == "none") {
print "You must specify a file to upload";
} else {
copy($file, "d:\Internet\Utilities\upload\ansi.txt");
unlink($file);
}
?>
<form action="upload.php" method="post" ENCTYPE="multipart/form-data">
<input type="file" size=40 name="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
<input type="submit" value="upload">
</form>
</BODY>
The error that I'm getting is as follows:
Warning: Unable to open '' for reading: No such file or directory in D:\Internet\Utilities\upload.php on line 8
Warning: Unlink failed (No such file or directory) in D:\Internet\Utilities\upload.php on line 9
Any ideas???