Forum Moderators: coopster

Message Too Old, No Replies

Output static image via php script

Script outputs dynamic image now, but I want to give out an image on file

         

aeae

6:40 pm on Sep 2, 2007 (gmt 0)

10+ Year Member



I setup my .htaccess file to respond to file requests for image.png with image.php. Then I setup that script to log information into a database and return a dynamic image created via imagettftext.

I realize now that I no longer need dynamic images created, but am well suited with just one static image file.

How can a still output an image with this script, but instead of using system resources to recreate the file, instead give out a static file already created on the server.

phparion

5:53 am on Sep 3, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



you dont need any php to display static image but just html... as you have not posted your code so i am giving you general guideline,

remove / comment (always backup old files) your dynamic image creation code and write

echo "<img src='images/image.png' alt='' width='' height=''>";

that's it!