|
Posted by Jerry Stuckle on 03/03/06 05:03
cman wrote:
> i'm only running the following code in a file name 'test.php':
>
> <?php
> //random_number.php
> $img_number = imagecreate(100,50);
> $white = imagecolorallocate($img_number,255,255,255);
> $black = imagecolorallocate($img_number,0,0,0);
> $grey_shade = imagecolorallocate($img_number,204,204,204);
>
> imagefill($img_number,0,0,$grey_shade);
> ImageRectangle($img_number,5,5,94,44,$black);
> ImageRectangle($img_number,0,0,99,49,$black);
>
> header("Content-type: image/jpeg");
> imagejpeg($img_number);
> ?>
>
OK, then, are you sure you have the correct libs compiled into PHP?
It works for me, also (on Firefox).
Live HTTP headers is showing a response of :
HTTP/1.x 200 OK
Date: Fri, 03 Mar 2006 03:03:33 GMT
Server: Apache/2.0.50 (Unix) DAV/2 PHP/5.0.4 mod_ssl/2.0.50 OpenSSL/0.9.7e
X-Powered-By: PHP/5.0.4
Content-Length: 1668
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: image/jpeg
Also, when I view the source, the first line I get is:
ÿØÿàJFIFÿþ>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
Try reporting all errors to the display and see of you get a message
about something wrong.
Do you have a URL we can try?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|