yii2 css文件无法加载,因为它是MIME类型text/html在Windows7 apache服务器上不是text/css [英] yii2 css file won't load because it's MIME type text/html is not text/css on windows7 apache server

查看:165
本文介绍了yii2 css文件无法加载,因为它是MIME类型text/html在Windows7 apache服务器上不是text/css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从Yii2开始,我想更改主题.到目前为止,我已经从 http://yii2.themefactory.net 下载了主题,并按照以下步骤操作

I'm starting on Yii2, and i want to change the theme. So far I've downloaded theme from http://yii2.themefactory.net and followed this steps

'view' => [
  'theme' => [
       'pathMap' => ['@app/views' => '@app/themes/mytheme'],
       'baseUrl' => '@web/themes/mytheme',
    ],
  ],

在config/web.php文件中.现在,当我尝试加载网站时,我得到了

on config/web.php file. Now when I try to load the site I got this

css文件无法加载,因为它的MIME类型text/html不是text/css

推荐答案

配置您的apache服务器.您的哑剧类型可能是错误的.

configure your apache server. Your mime types are probably wrong.

您需要启用mod_mime apache模块,并确保在httpd.conf(或.htaccess)中包含这些行

You'll need mod_mime apache module enabled, and ensure you have these lines in your httpd.conf (or .htaccess)

AddType text/css .css

这篇关于yii2 css文件无法加载,因为它是MIME类型text/html在Windows7 apache服务器上不是text/css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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