用户
 找回密码
 入住 CI 中国社区
搜索
查看: 4350|回复: 3
收起左侧

[讨论/交流] CI载入CSS的解决办法

[复制链接]
发表于 2011-4-8 15:53:42 | 显示全部楼层 |阅读模式
按照论坛中给出的方法,发现我还是无法载入CSS文件和图片。。。
查看资料下,想起去掉www.example.com/xxx/index.php/  曾今加入了 一个文件.htaccess 修改下里面的内容
RewriteEngine on   
RewriteCond $1 !^(index.php|images|style|js|robots.txt)
RewriteRule ^(.*)$ /codeigniter/index.php/$1 [L]

发现其中的images 是指排除的文件名 类似的 style 和js也是文件名
所以CSS文件、图片和JS文件都放在对应的文件夹下,放在其他命名的文件夹下,会导致CSS文件不起作用
发表于 2011-4-8 16:02:38 | 显示全部楼层
PHP复制代码
 
$config['index_page'] = '';
 
复制代码

这里去掉index.php
发表于 2012-9-13 16:31:48 | 显示全部楼层
为什么我会提示错误啊 Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

发表于 2012-9-13 22:04:02 | 显示全部楼层
也可以放在一个文件夹下嘛

本版积分规则