You are here: Re: imagejpeg generating string not image even with header("Content-type:image/jpeg") « PHP Programming Language « IT news, forums, messages
Re: imagejpeg generating string not image even with header("Content-type:image/jpeg")

Posted by jshanman on 03/03/06 03:04

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);
> ?>

Did you try the

while (@ob_end_clean());

as the first call in your document?

- JS
http://www.endeavorpub.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация