note 45609 added to function.imagejpeg

From: Date: Sun, 12 Sep 2004 23:20:32 +0000
Subject: note 45609 added to function.imagejpeg
Groups: php.notes 
Request: Send a blank email to php-notes+get-76560@lists.php.net to get a copy of this message
Scenario: When pointing your browser directly at a script outputting an image, it displays without problem, but when using it in another page via html (i.e. : img src="x.php?yada=yada" ), you get a broken image. Reason: *Any* extra data sent along with the image will cause it to not display on other pages. Extra data may include, whitespace characters (check the begginings and ends of your files), or a call to session_start(), which is what got me. Summary: If you're going to send an image DONT START A SESSION in the script that is outputting the image, and make sure that the PHP delimiters are the first and last things in your file. ---- Manual Page -- http://www.php.net/manual/en/function.imagejpeg.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45609 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45609&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45609&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76560) next »