Re: [PHP] Problems producing an image

2001-12-06 Thread Harshdeep S Jawanda


 Try taking the header line out; that way if there is an error message

 you should be able to see it in 'View Source'.

Finally managed to solve the problem - there was an empty line before
the start tag (?) in the php file producing the image, that's all.

So, for php files that are to produce an image, the first two
characters in the file should be the php start tag.

=
Please send all emails to my automatically redirecting
address: [EMAIL PROTECTED]

Regards,
Harshdeep S Jawanda
[[EMAIL PROTECTED]]

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

-- 
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]




Re: [PHP] Problems producing an image

2001-12-05 Thread David Robley

On Thu,  6 Dec 2001 13:50, Harshdeep S Jawanda wrote:
 I am using the following code to try to produce a test image:
 ?
   //phpinfo();
   $gif = ImageCreate(200,200);
 $bg = ImageColorAllocate($gif,0,0,0);
 $tx = ImageColorAllocate($gif,255,128,128);
 ImageFilledRectangle($gif,0,0,200,200,$bg);
 ImageString($gif,3,70,90,it works !,$tx);

 // send the image
 header(content-type: image/jpeg);
 imagejpeg($gif);
 ?

 I am trying to display this image on the page
 http://www.harshdeepjawanda.com/t2.html .

 Phpinfo() shows that PHP was compiled with: --with-gd, --with-jpeg-dir
 and --with-png-dir, among others. Why then am I not able to see any
 image?

Try taking the header line out; that way if there is an error message you 
should be able to see it in 'View Source'.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Enter that again, just a little slower.

-- 
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]