Image functions
| From: | Gerard Samuel | Date: | Fri, 19 Apr 2002 16:59:46 +0000 |
| Subject: | Image functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93735@lists.php.net to get a copy of this message | ||
Im trying to modify a poll script to not use the hard coded image files and use php's image functions.
On the file that will be outputing the poll graphics, I tried at the top of the page ->
header("Content-type: image/png");
and
header("Content-type: image/jpeg");
For some reason, when the page is viewed, the only thing that gets output to the browser is the url of the page....
I tried using one of the examples on php.net image create routines and its still doing the same thing..
Here is a snip
<?php
/*
* THIS HAS TO GO HERE FOR THE IMAGE BARS
*/
header("Content-type: image/jpeg");
$pollID = $HTTP_POST_VARS['pollID'];
$voteID = $HTTP_POST_VARS['voteID'];
<------snip--------->
If I comment out the header call, Im back to normal...
Im running PHP 4.1.2 with GD support
Any thoughts
Thanks