How to include PHP code in CSS?

前端 未结 4 1728
清酒与你
清酒与你 2020-12-09 06:47

I have a script, and I will be needing to include PHP code in the CSS stylesheet. But when I try adding PHP code in my CSS file nothing occurs! Is it possible?

4条回答
  •  渐次进展
    2020-12-09 07:07

    Putting PHP code in a CSS file will not work. You will have to create a PHP file first, and let that output CSS code. And also set the correct content type headers.

    
    
    body {
        color: 
    }
    ...
    

提交回复
热议问题