I am receiving the following error:
Warning: copy(test/IMAGE NAME.jpg): failed to open stream: Permission denied in /home/beogor/public_html/gallery_php/doupload.php on line 12
when the file doupload.php is run. Here are the first twenty lines of code:
catagory, useremail, and fileName are passed in from a form via POST.
assume catagory is a valid directory within the folder that upload.html and doupload.php are located in.
Please let me know if you have any ideas.
Thanks!
<?
// PASSED VARS:
// $fileName
// $catagory
// $useremail
$destination = "$catagory";
$destination .= "/";
$destination .= "$fileName_name";
copy ("$fileName", "$destination"); // LINE 12
$to = "kevin@beog.org";
$subject = "IMAGE UPLOAD SUCCESSFUL";
$msg = "The file named: $fileName has been uplaoded in the folder: $catagory by the user: $useremail";
$msghead = "";
mail($to, $subject, $msg, $msghead);
//mail($useremail, $subject, $msg, $msghead);
?>