Hey guys, how do you create an image in php code with the header already set?
do you create a seperate file like say image.php with only the 2 lines, and then call this image.php from a src tag like this <img src=image.php ?? Does this work? It seems to not be working for me
Also can you get gdlib for use on XP, my laptop is using XP and I have php installed on my laptop.
Thanks guys
//image.php
header("Content-type: image/jpeg");
imagejpeg($_SESSION['current_image']);
How do you create an image in code w/header sent already?
Moderator: General Moderators
This done usually with an image tag like this:
image_maker.php makes the image and you use the header() to make the browser think it is an image.
There are some projects that make it easy to have php/apache/mysql on XP
I like xampp at apachefriends.org/en
Code: Select all
<img src="e;image_maker.php?file=someparms"e;>There are some projects that make it easy to have php/apache/mysql on XP
I like xampp at apachefriends.org/en