Content-type not working in PHP

后端 未结 13 2125
时光说笑
时光说笑 2020-12-09 12:16

I have some issues with a PHP file that is not working properly. The Content-type does not get recieved by any browser at all. Firebug interprets the file as text/html inste

相关标签:
13条回答
  • 2020-12-09 13:05

    Maybe there are issues with caching.

    Try this:

    header('Content-type: text/css');
    header("Cache-Control: no-cache, must-revalidate");
    header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
    
    echo 'body {background-color: #000000; }';
    

    Works for me on an out of the box XAMPP installation and firefox - firebug reports correct content type.

    0 讨论(0)
提交回复
热议问题