Skiy 发表于 2016-12-23 02:01:53

阿里的虚机是 Apache 的吧。要设置 .htaccess,将 index.php 隐藏掉,且主机要开启 pathinfo 模式。

xuxl96 发表于 2016-12-23 09:36:14

本帖最后由 xuxl96 于 2016-12-23 11:47 编辑

这个就是我news.php的代码。当news.php里面只写echo “11”,都是404

Hex 发表于 2016-12-23 11:53:45

xuxl96 发表于 2016-12-23 09:36
这个就是我news.php的代码。当news.php里面只写echo “11”,都是404

控制器文件名要大写字母开头,例如 News.php

xuxl96 发表于 2016-12-23 14:18:52

嗯嗯,谢谢

keweisen 发表于 2016-12-23 17:32:36

apache的httpd-vhosts.conf,配置了吗?
然后CI里 application/config/config.php有没有配置url:
$config['base_url'] = 'http://www.keweisen.dev';//访问域名
$config['cookie_domain']        = 'www.keweisen.dev';//针对cookie

smartweb 发表于 2016-12-24 17:15:26

win文件名不分大小写,但linux必须认真对待,看好你的大小写

smartweb 发表于 2016-12-24 17:17:33

Hex 发表于 2016-12-23 11:53
控制器文件名要大写字母开头,例如 News.php

这种问题一开口就知道是大小写原因了;P,win=>linux必死的原因

huxuebao 发表于 2017-1-6 15:39:42

控制器model首字母没大写

huxuebao 发表于 2017-1-6 15:41:33

重写文件$1前加?{:1_1:}
页: 1 2 3 4 [5]
查看完整版本: ci上传到服务器之后,报404