Welcome Guest, Not a member yet? Register   Sign In
PHP in CSS file
#3

[eluser]Tom Glover[/eluser]
[quote author="daulex" date="1213747249"]found this on the net
Quote:I guess php tags were not being processed because the webserver did not associate a .css file with the php script engine.
The simplest way is to save the css file as
stylesheet.php and change the link to

link href="stylesheet.php" rel="stylesheet" type="text/css"

Alternatively you could solve that by telling your webserver that .css files are infact php scripts, but how you do that depends on what webserver you are using. I'd stick to the first method, as it's simple.
[/quote]

Remember php ignores any other code in a file that is not wrapped in php tags.


Messages In This Thread
PHP in CSS file - by El Forum - 06-17-2008, 12:15 PM
PHP in CSS file - by El Forum - 06-17-2008, 01:00 PM
PHP in CSS file - by El Forum - 06-17-2008, 01:12 PM
PHP in CSS file - by El Forum - 06-17-2008, 01:31 PM
PHP in CSS file - by El Forum - 06-17-2008, 04:54 PM
PHP in CSS file - by El Forum - 06-17-2008, 09:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB