RE: [PHP] Newbie - create image error URGENT
| From: | Scott Hurring | Date: | Fri, 17 May 2002 20:50:59 +0000 |
| Subject: | RE: [PHP] Newbie - create image error URGENT | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-98188@lists.php.net to get a copy of this message | ||
Probably don't have the GD extension enaabled.
On a win machine, it's easy, look in your php.ini
and set the extensions_dir to where your extensions
are.... then un-comment php_gd.dll
---
Scott Hurring
Systems Programmer
EAC Corporation
ScottH@eac.com
Voice: 201-462-2149
Fax: 201-288-1515
> -----Original Message-----
> From: Dani [mailto:universal2001@iprimus.com.au]
> Sent: Friday, May 17, 2002 7:40 PM
> To: php-general@lists.php.net
> Subject: [PHP] Newbie - create image error URGENT
> Importance: High
>
>
> Hi everyone!
>
> I'm still learning PHP and MYSQL using windows98, MYSQL, PHP 4 in my
> local hard drive.
>
> I want to learn uploading image and resizing image in my
> local machine.
>
> when I execute this code:
>
> <?PHP
> //setup image
> $height = 200;
> $width = 200;
>
> $im = ImageCreate($width,$height);
> $white = ImageCreateAllocate ($im, 255, 255, 255);
> $black = ImageCreateAllocate ($im, 0, 0, 0);
>
> //Draw on image
> ImageFill($im, 0, 0, $black);
> ImageLine($im, 0, 0, $width, $height, $white);
> ImageString($im, 4, 50, 150, "Sales", $white);
>
> //output image
> Header ("Content-type: image/png");
> ImagePng ($im);
>
> //Clean up
> ImageDestroy($im);
>
> I get error message: "Fatal error: Call to undefined function:
> imagecreate() in D:\graphic_practise\index.php on line 15"
>
> What did I do wrong?
>
> any advice/ help is greatly appriciated.
>
> Thanks,
>
> Ardani
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>