Re: CSS as PHP

From: Date: Wed, 23 Oct 2002 11:49:37 +0000
Subject: Re: CSS as PHP
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-121065@lists.php.net to get a copy of this message
You can actually make your CSS file called .php but used just as you would use .css file. i.e: called via <LINK ... from head. Problem is only one - normally browser caches a CSS file. But, because PHP outputs particular headers it insists not to get cached easily, thus browser will be reading it all the time. Solution: use .php file instead of .css file for Style Sheets, but add some headers to .php file so it gets cached unless is changed. I worked it very well several times. --- Maxim Maletsky maxim@php.net www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 "Brian V Bonini" <b-bonini@cox.net> wrote... : > This rings a bell, I think I may have tried this unsuccessfully at one time. > You can however create styles in a .php file and use "include" to place then > into the main file. Works out to be essentially the same thing and opens up > a whole lot of new possibilities in terms of dynamic styles. > > > -----Original Message----- > > From: Liam.Gibbs@dfait-maeci.gc.ca [mailto:Liam.Gibbs@dfait-maeci.gc.ca] > > Sent: Tuesday, October 22, 2002 3:13 PM > > To: php-general@lists.php.net > > Subject: [PHP] CSS as PHP > > > > > > Can a CSS be written in PHP? > > > > For instance, can I store my style-sheet in Stylesheet.php as > > > > <?PHP > > BODY { Text-Align: Justify; } > > . > > . > > . > > ?> > > > > And have it work? > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#121065) next »