yingcailu 发表于 2017-3-3 10:35:00

二级目录在服务器上无法访问

我的目录结构:
controllers
      Welcome.php
      admin
                        Welcome.php

在本地服务器上测试:http:///index.php/admin/Welcome/index正常。
可以上传到服务器      http:///index.php/admin/Welcome/index    报错:No input file specified.

尝试配置过 $config['base_url'] = 'http://edu.5yc.cn'; 没有解决。

这和服务器有什么关系么?

yingcailu 发表于 2017-3-3 10:39:18

为什么在服务器上http://edu.5yc.cn/index.php/welcome/index这个都不行呢?但http://edu.5yc.cn/index.php能正常显示,难道这个CI还需要有什么特殊的配置么?

Hex 发表于 2017-3-3 11:29:15

yingcailu 发表于 2017-3-3 10:39
为什么在服务器上http://edu.5yc.cn/index.php/welcome/index这个都不行呢?但http://edu.5yc.cn/index.php ...

index.php/welcome/index 这种形式需要你的服务器支持 PATH_INFO,改用 index.php?/welcome/index 这样试试,如果你没法改服务器配置的话。。。。
页: [1]
查看完整版本: 二级目录在服务器上无法访问