Hello,
I have been working with a script that creates a resized image and keep running into an error I can't work out:
Warning: imagejpeg() [function.imagejpeg]: Unable to open '/home/mysite/public_html/images' for writing.
I have checked and rechecked my permissions for this folder and they are set at 777. As well, I can use a different script and move_uploaded_file and write to that same folder with no problem.
Can someone please look at my code and tell me what I am missing?
Thanks,
Jack
<?php
foreach($_FILES as $file_name => $file_array)
{
$src_img = imagecreatefromjpeg($file_array['tmp_name']);
$new_w = "600";
$new_h="450";
$dst_img = imagecreatetruecolor($new_w,$new_h);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
imagejpeg($dst_img, "/home/royalway/public_html/images", "75");
}
?>