Re: Using php to modify a css file
| From: | Jednorozec Pokojowiec | Date: | Sun, 23 May 2004 02:03:39 +0000 |
| Subject: | Re: Using php to modify a css file | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186776@lists.php.net to get a copy of this message | ||
On Sat, 22 May 2004 21:03:10 -0400 (EDT), mike@teczno.com (Michal
Migurski) wrote:
>> Then I added the following line to my .htaccess file AddType
>> application/x-httpd-php .css It works just fine at my hosting company
>> but I can't get it to work locally.
>
>Try fetching it with cUrl, or using Mozilla's view-headers feature. Make
>sure that the PHP is in fact being parsed, and that the Content-Type
>header is correct.
Where do I find the view-headers? I see view source and view info.
I've tried pointing the browser at the css file and everthing looks
just fine.
>You'd be better off not messing with AddType at all to parse .css files
>- it's more important that the content-type be "text/css."
I used the AddType because I read somewhere that some browsers
demanded that the extension be .css. The html that I'm using to load
the css files is:
<link href="styles/My4CSS.css" rel="stylesheet" type="text/css"
/>
<style type='text/css'>
@import url(styles/MyCSS.css);
</style>
The reason for the two files is that My4CSS.css contains code that
doesn't break Netscape 4 (people are still using that garbage) and
MyCSS.css is the code that I want for decent browsers. Just doing the
AddType without changing the css files at all breaks things locally.
Without a <?php in the file I think that whether it's parsed by php or
not shouldn't make any difference -- but it does.
>---------------------------------------------------------------------
>michal migurski- contact info and pgp key:
>sf/ca http://mike.teczno.com/contact.html