Re: Image functions
| From: | Matthew Gray | Date: | Fri, 19 Apr 2002 21:06:36 +0000 |
| Subject: | Re: Image functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93756@lists.php.net to get a copy of this message | ||
You won't get very far if you aren't outputting an image to the browser
using ImageJpeg(), etc.
Matt
Matthew J Gray
UWRF - Information Technology Services
Matthew.J.Gray@uwrf.edu
Gerard Samuel wrote:
> 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