Re: PHP displaying images

From: Date: Sat, 29 Jan 2005 05:09:13 +0000
Subject: Re: PHP displaying images
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-207668@lists.php.net to get a copy of this message
This does the same for png as well. No errors are generated when header () is commented out or other content-types are specified Ian Johnson On Fri, 2005-01-28 at 20:45 -0800, Richard Lynch wrote: > Ian Johnson wrote: > > I am trying to use GD to create and manipulate images but the statement: > > > > header ("Content-type: image/jpg"); > > > > generates the error message: > > > > The image "http://localhost/gdtst2.php" cannot > > be displayed, because > > it contains errors. > > "contains errors" here means "It's not a valid JPEG" > > So comment out the header() and see if you see any error messages then. > > After it looks like it's a JPEG (starts with yoya) put the header() line > back in. >

« previous php.general (#207668) next »