Include images in php file
| From: | Marek | Date: | Thu, 28 Jun 2007 12:51:27 +0000 |
| Subject: | Include images in php file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-257909@lists.php.net to get a copy of this message | ||
Hi,
I want to display images with my php script but i want it to be just ONE file. I can't have separate image files or folders etc.
I suppose I could get this result by writing a function that generates the right image by drawing it from scratch. But that way I can't have any photos.
My question: Is there any way to include an entire jpg/gif/png into a php file? So that when i call ?pic=myphoto it can present the right photo without a database or additional files. Like a serialized form of an image or something that can be copied, saved in a text editor and later reassembled as a proper photo.
Thanks for your help.
Marek