通过PHP在Firefox忽略产生CSS,但在Chrome,IE8工作 [英] CSS generated via PHP ignored in Firefox but works in Chrome, IE8

查看:100
本文介绍了通过PHP在Firefox忽略产生CSS,但在Chrome,IE8工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在那里通过PHP(坚持了一个奇怪的CMS从连韦德程序员)生成的css被3.X的Firefox和ingored可能更早一个奇怪的问题。但是,页面加载在其他浏览器IE7一样/ 8和Chrome确定。萤火虫也没有看到任何的CSS但是当我指出我的浏览器到PHP-CSS-生成脚本拿给我一个简单页面的CSS code

i have a weird problem where css generated via php (stuck with a weird cms from an even weider programmer) is ingored by firefox 3.X and probably earlier. But the page loads ok in other browsers like IE7/8 and chrome. Also firebug doesn't see the css either but when i point my browser to the php-css-generation script it show me a plain page with css code

<link rel="stylesheet" type="text/css" href="app/style.php?PageID=224&Admin=">

有谁知道我应该在哪里寻找一些答案,不然怎么可能解决这一问题?莫不是有问题吗?&放大器;联系=部分。

does anybody know where should i look for some answers or how to possibly fix this? Could there be a problem with that "&Admin=" part?

推荐答案

最可能的原因是,您使用的是的text / html 的PHP的默认Content-Type的输出,使火狐认为:

The most likely cause is that you are using PHP's default Content-Type output of text/html so Firefox thinks:

这是写在HTML,样式表语言,我不明白,所以会忽略一个样式表。

This is a stylesheet written in HTML, a stylesheet language I don't understand and will therefore ignore.

其他的浏览器是,presumably,补偿误差。

The other browsers are, presumably, compensating for the error.

地址:

header('Content-type: text/css');

这篇关于通过PHP在Firefox忽略产生CSS,但在Chrome,IE8工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆