I've been editing the .css file trying to make php codes working but when i put them normally it comes up like a normal text , i want to know can i run a php file in a .css file? if yes will it work?
Asked
Active
Viewed 334 times
0
-
1possible duplicate of [How do i run PHP inside CSS](http://stackoverflow.com/questions/12367134/how-do-i-run-php-inside-css) – mario Jul 05 '13 at 01:13
-
2and more commonly: [Using .htaccess to make all .html pages to run as .php files?](http://stackoverflow.com/q/4687208) – mario Jul 05 '13 at 01:14
1 Answers
1
<?php
header("Content-type: text/css");
// and echo your CSS code...
But don't do it, it's not worth it. Just save the dynamic CSS to a CSS file every time it changes

nice ass
- 16,471
- 7
- 50
- 89
-
I want to do the opposite , I wan't to make a .css file run a php file inside it? – Baa Ha Jul 05 '13 at 01:19