Hi there. I try to resize an uploaded picture with PHP and it worked previously, but somehow something changed and it stopped working. All I get is a crazy error I don’t understand.
Who can help me?
The part for resizing the image (uploading works) is this:
[code]83. $image_p = imagecreatetruecolor($breedte, $hoogte);
84. $image = imagecreatefromjpeg($plaatje);
85. $a = imagecopyresampled($image_p, $image, 0, 0, 0, 0, $breedte, $hoogte, $breedte_origineel, $hoogte_origineel);
86. $b = imagejpeg($image_p, $image, 100);
87. $c = imagedestroy($image_p);
88. echo ‘$image_p: ‘.$image_p.'<br>$image: ‘.$image.'<br>$a: ‘.$a.'<br>$b: ‘.$b.'<br>$c :’.$c;
And I get this error:
Warning: imagejpeg() [function.imagejpeg]: Unable to open ‘Resource id #10’ for writing: Permission denied in /Applications/MAMP/htdocs/beheer/nieuws/toevoegen.php on line 86
$image_p: Resource id #8
$image: Resource id #10
$a: 1
$b:
$c :1