FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Parsing .css files with php: Cons?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Parsing .css files with php: Cons? [message #176719 is a reply to message #176685] Thu, 19 January 2012 20:45 Go to previous messageGo to previous message
J. Frank Parnell is currently offline  J. Frank Parnell
Messages: 12
Registered: January 2012
Karma:
Junior Member
On Jan 17, 4:32 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On Jan 16, 9:36 pm, "J. Frank Parnell" <jugl...@gmail.com> wrote:
>
>> given: I know about @import and cascading styles, etc etc.
>
>> Is is cool to parse .css files with php?  Like I may want to include()
>> sections into an overall .css.  Or i may want to do like color:#<?php
>> echo $thecolor; ?>.  That kind of stuff.
>
>> I guess there might be a little more overhead, but what's a few .css
>> files within a whole cms like wordpress?  I'm just looking for gotchas
>> and unforseen problems.
>
>> thanks,
>> j
>
> I suspect a more normal way to do this would be to use php files to
> generate your css rather like you would use them to generate your
> html. So in the html sent to the browser you would have:
> <link type="text/css" rel="stylesheet" media="screen" charset="utf-8"
> href="http://www.example.com/dynamic_css.php?anyparms">
>
> and dynamic_css.php would return the css.

ok, yeah, this would be my preferred way of the three suggestions
(thanks all!). Then, i suppose, I would need to set proper headers in
the php file? or maybe it would come thru fine by itself?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: phpinfo is not showing in php4 version
Next Topic: arrays with holes
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 19:21:07 GMT 2024

Total time taken to generate the page: 0.04498 seconds