TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   How can i read an image from the inside of a php file (http://www.talkphp.com/general/5439-how-can-i-read-image-inside-php-file.html)

skibbli 06-05-2010 11:38 PM

How can i read an image from the inside of a php file
 
i want to be able to refer to an image on the INSIDE of a php file.

like this:

<img src=".?img=file.gif">

But. when i mean the INSIDE i mean the image data is literally included in the file, i know this is possible because ive seen it done in the c99 shell. i wasn't able to figure out exactly how they did it because the code is so complex

Village Idiot 06-06-2010 03:21 AM

Quote:

Originally Posted by skibbli (Post 30610)
i want to be able to refer to an image on the INSIDE of a php file.

like this:

<img src=".?img=file.gif">

But. when i mean the INSIDE i mean the image data is literally included in the file, i know this is possible because ive seen it done in the c99 shell. i wasn't able to figure out exactly how they did it because the code is so complex

Use the header function to set the MIME type to the image type you are using, then print the file content using fopen and related functions.


All times are GMT. The time now is 01:44 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0