[eluser]quasiperfect[/eluser]
hi
i have a controller that manages all my images
the idea is that i want to show some images based on session variables
i call the controller in my html like this
Code:
<img src="http://site/image_processor/parameter/parameter/">
my controller logic is like this
make some verifications if user is ok then show image like this
Code:
$im = @imagecreatefromjpeg($image);
if(!$im)
{
$this->_img_error($errorcode);
}
else
{
header("Content-type: image/jpg");
imagejpeg($im);
imagedestroy($im);
}
the function _img_error generates a image with a text containing the error so i always output a image
the problem is that i get a lot of errors in my logs because the headers are already sent
when the session lib sets the cookie
any idea on how to solve this ?