0

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?

Baa Ha
  • 1
  • 1
    possible 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
  • 2
    and 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 Answers1

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