Re: Include images in php file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-06-28 at 16:39 +0300, Marek wrote:
> It's not really a limitation but a personal goal.
> 
> I develop a small public script that is meant to be very compact and 
> portable. All of its functionality fits nicely in one php file. But at 
> the moment it requires a bunch of tiny icons. I would like to eliminate 
> this and just have a single file. But without ruining the graphical 
> interface.
> 
> So far the best solution i just came up with is to have two files - one 
> would be an image with all the icons and i could use css to display the 
> right icon.

Usually compactness is achieved by having one directory in which all
your files reside. Having everything embedded in one php file (images
and everything) is ridiculous. But as other have said you can base64
encode your images and embed them directly into the source and use a get
parameter to select them when accessing the page. So the page would
produce HTML that calls the same page with different parameters for the
images. Same as you're no doubt already doing... front end loader
pattern.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux