arunpatal Posted November 28, 2012 Share Posted November 28, 2012 Hello, I just wanted to ask if i can add some php codes in .css file? Quote Link to comment https://forums.phpfreaks.com/topic/271294-php-code-in-css-file/ Share on other sites More sharing options...
trq Posted November 28, 2012 Share Posted November 28, 2012 Of course. You just need to configure your server to parse a .css file as php, or serve .php files as the css content type. Quote Link to comment https://forums.phpfreaks.com/topic/271294-php-code-in-css-file/#findComment-1395888 Share on other sites More sharing options...
arunpatal Posted November 28, 2012 Author Share Posted November 28, 2012 Of course. You just need to configure your server to parse a .css file as php, or serve .php files as the css content type. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/271294-php-code-in-css-file/#findComment-1395890 Share on other sites More sharing options...
RobertP Posted November 28, 2012 Share Posted November 28, 2012 (edited) Of course. You just need to configure your server to parse a .css file as php, or serve .php files as the css content type. i recommend you serve a php file with a header for css, as the other method will probably cause you more head headaches in the end Edited November 28, 2012 by RobertP Quote Link to comment https://forums.phpfreaks.com/topic/271294-php-code-in-css-file/#findComment-1395985 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.