Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I see the picture in php.

Status
Not open for further replies.

digitalroamer

Programmer
Jan 4, 2005
6
CA
<?
$id = imagecreate(100,100);
$red = imagecolorallocate($id,255,0,0);
imagefill($id,0,0,$red);
imagewbmp($id);
imagedestroy($id);
?>

it seems the format doesn't match. But the gd version2 doesn't support gif any more. What should I do to see the picture? Thanks.
 
I'd just output a PNG or a JPEG.

But you need to have the script output an appropriate header. See the online manual entry for imagecreate() for an example.

With all that, just point your browser at the script.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
oh, yes, you are right, I don't script a header since it always says a parse error when I write

header("Content-type : image/png");

is it because I configure wrong?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top