I have small upload script which uploads the file in the upload directory.
Code: Select all
<?php
if(isset($HTTP_POST_VARS["Submit"]))
{
if ($fupload_size > 307200)//if greater than 300KB
{
header("Location:error.php");
exit;
}
else
{
if(!copy ($fupload, "upload/$fupload_name"))
echo "failed to copy the image";
else
header("Location:thanks.php");
}
}
?>failed to create stream: Permission denied
how can I change the directory read/write by php chmod?
please Help.