Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
css未加载到codeigniter中_Css_Codeigniter_Base Url - Fatal编程技术网

css未加载到codeigniter中

css未加载到codeigniter中,css,codeigniter,base-url,Css,Codeigniter,Base Url,我有这个密码 <link href = "<?php echo base_url(); ?>css/style.css” rel=”stylesheet" type="text/css" /> 尝试在函数中包含相对链接,如 或者无论您的文件夹结构是什么!如果您使用.htaccess文件删除index.php,也要确保该目录未被该文件“阻止” RewriteEngine on RewriteCond $1 !^(index\.php|css|robots\.txt) R

我有这个密码

<link href = "<?php echo base_url(); ?>css/style.css” rel=”stylesheet" type="text/css" />

尝试在函数中包含相对链接,如

“rel=“stylesheet”type=“text/css”/

应用程序/view/globals/css/style.css“type=“text/css”media=“screen”/>

或者无论您的文件夹结构是什么!

如果您使用
.htaccess
文件删除index.php,也要确保该目录未被该文件“阻止”

RewriteEngine on
RewriteCond $1 !^(index\.php|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
我个人会将css目录移动到资产目录中:

/assets/css
/assets/js
/assets/img

查看页面的源代码并单击css文件链接(如果是404s),然后检查.htaccess文件并确保该目录可用!

css文件的默认位置与应用程序的级别相同,即

/css
/application

检查建议的路径。

打开源代码中给出的url,并在此处给出错误信息。我打赌你的.htaccess不正确。你确定你的css文件夹位于你的网站根目录中吗?似乎在“我使用的字符”之后,它与此不匹配。所以这真的是一个打字错误。源代码视图显示了它。
/css
/application