On Tuesday, January 20, 2004, at 04:08 AM, John Nichel wrote:

Freedomware wrote:
OK, it looks like there are at least three ways to do this. I now have an original style sheet with a .css extension and copies with .php and .css.php extensions.
All three style sheets have the following code at the top:
<?
header("Content-Type: text/css");
?>

I would think that the above is going to cause problems. First, if you have something like this...


<html>
<head>
<title>My Page</title>
<?php include ( "style.php" ); ?>
</head>
....

and style.php has the header call in it, you're going to get an error. Second, I don't know how much differently the browsers handle text/html and text/css, but being that the header has to be sent before any output to the browser, you will have changed the mime type of the whole document.

I think he/she was discussing the use of PHP in external (linked or @import'ed) style sheets, NOT inline ones. This is also why the OP was talking about renaming extensions, etc etc.


But yes, it's worth mentioning that inline style sheets don't need anything special at all.


Justin French



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



Reply via email to