On 25-Jul-2001 Matt Greer wrote:
> I'm trying to get a simple piece of code involving gd functions to work just
> to ensure gd is working properly on my server. I took this straight from my
> book. All that comes up is a broken image. I talked with my host and they
> assured me gd is installed and working properly on the server. Any ideas?
> 
> Here's what I'm trying to do:
> 
> <?php
> //draw1.php
> Header("Content-type: image/jpeg");
> $image = ImageCreate(200,150);
> $gray = ImageColorAllocate($image,204,204,204);
> $blue = ImageColorAllocate($image,0,0,255);
> ImageLine($image,10,10,150,30,$blue);
> ImageJPEG($image);
> ImageDestroy($image);
> ?>
> 
> This is from chapter 16 of Beginning PHP4 from Wrox press.
> 

Works fine for me. at the top, try something like:

if (! function_exists('ImageCreate')) {
   Header("Content-type: text/html");
   echo "Graphics not supported !";
}

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to