I'm not sure where the root of this issue is with my code not uploading a file to the temporary folder to my selected folder. Here is the PHP for testing the upload:
// $upload is the name of the formfield
$folder = "/upload"; //(htdocs/upload)
$filename = "";
$filename = basename($upload_name);
if(!copy($userfile, "$folder/$filename")) {
echo "Error: $filename cannot be copied.";
}
This is what I receive:
Warning: Unable to open '' for reading: Permission denied in d:\program files\apache group\apache\htdocs\insertbug.php on line 18
Is it not reading the contents of $filename?