Hi Everyone,
I was wondering if someone would be albe to hlep me i have a image upload script, that i had working a long time ago and cant remember how to get it working agin.
I keep getting the following error:
[QUOTE]
06.jpg
Warning: copy(../psimages/06.jpg): failed to open stream: Permission denied in /home/username/public_html/foldername/admin/uploadimage.php on line 16
Go back to the main menu
This is the script:
[code=php]
<?PHP
echo $imgfile_name;
$dir=”../psimages/”;
$ifile = $dir . $imgfile_name;
$ext = strrchr($imgfile_name,’.’);
if (isset($submit))
{
$fileexists = “n”;
while ($fileexists != “y”)
{
copy($imgfile,$dir.$imgfile_name);
$fileexists = “y”;
}
if (!is_uploaded_file ($imgfile))
{
echo “<b>$imgfile_name</b> couldn’t be copied !!”;
}
}
echo “<img src=../psimages/$imgfile_name>”;
echo”<a href=adminlist.php>Go back to the main menu</a>”;
?>
Can anyone help me ?