Closer 发表于 2015-9-16 15:16:43

van188 发表于 2015-9-16 11:42
嗯嗯 我之前是放在和application同级目录的 但是也是访问不到。。。

不太可能
一般都能訪問到
除非你訪問的路徑被改寫了

gogogo1027 发表于 2015-9-16 18:07:56

base_url()这个方法你用过木有的啊,它默认是带上个你配置后缀的啊!还有,config.php下的index_url配置了的话也会出问题。

gogogo1027 发表于 2015-9-16 18:10:35

我们部署项目不是像你这样搞的,
目录有
system
application
static
index.php

这个static是个静态目录,只开放了static这个目录和index.php可以直接访问,其他目录或者文件都使用rewrite到index.php上。

mycode43 发表于 2016-5-26 16:23:55

你的问题解决了吗?我也遇到这问题了

citestcainiao 发表于 2016-10-11 10:15:53

htaccess文件的配置的问题,ci为了安全配置了application不能访问,楼上已经说了,下面是我的配置文件
<Directory "F:\wamp\www\citest">
    #定义目录索引页面
    DirectoryIndex index.php index.html
    order deny,allow
    RewriteEngine on
    RewriteBase /
    RewriteCond $1 !^(index\.php|public|application)
    RewriteRule ^(.*)$ /citest/index.php/$1
</Directory>
需要在RewriteCond这里配置出可以直接访问的文件夹名称,比如你的css在public,这里要加上,我的是放在application
页: 1 [2]
查看完整版本: CI html页面不能加载css问题