Wow this has become frustrating! 🙁
I can't get this simple file upload script to work.
$file_dir = "/home/mel/public_html/caseuploads/";
print "path: $fupload<br>";
print "name: $fupload_name<br>";
copy($fupload, "$file_dir/$fupload_name") or die("Couldn't upload file");
Here's my form:
<table border="0" cellspacing="1" cellpadding="3" align="center">
<tr class="even">
<td>Choose File:</td>
<td><input name="fupload" type="file" id="fupload"></td>
</tr>
</table><p>
with the form tags of course...
Here's the error (and caseuploads IS writeable by all):
Warning: copy(C:\Documents and Settings\Server\Desktop\file.sql): failed to open stream: No such file or directory in /home/mel/public_html/inc/functions.php on line 156
Couldn't upload file
(BTW, line 156 us the "Copy" command above)