Re: Parsing .css files with php: Cons? [message #176735 is a reply to message #176726] |
Fri, 20 January 2012 13:33 |
Captain Paralytic
Messages: 204 Registered: September 2010
Karma:
|
Senior Member |
|
|
On Jan 20, 10:25 am, Michael Fesser <neti...@gmx.de> wrote:
> .oO(Captain Paralytic)
>
>> On Jan 19, 8:45 pm, "J. Frank Parnell" <jugl...@gmail.com> wrote:
>>> On Jan 17, 4:32 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
>>>> 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?
>
>> The latter
>
> No. You have to explicitly send the correct header or some browsers
> might ignore the CSS. For example
>
> header('Content-Type: text/css; charset=UTF-8')
>
> Micha
>
> --http://mfesser.de/blickwinkel
Oh OK. Any ideas which ones?
|
|
|