Jump to content
新域网络技术论坛
Sign in to follow this  
Jamers

Codeigniter使用PATH_INFO无法访问处理记录

Recommended Posts

今天把codeigniter升级到3.1.8,所有配置文件都看过了,就是使用 xxxx.xx/index.php/welcome 直接显示404,然后打印$_SERVER变量中发现居然没有PATH_INFO,然后开始漫长的搜索。

 

最后处理结果:

在apache的配置文件中目录配置中,添加下列语句:

AcceptPathInfo On

然后重启Apache,就可以了。。唉。。。

 

Share this post


Link to post
Share on other sites

CI_ENV设置用以切换不同的配置文件。

 

apache httpd.conf下面添加,可选参数:development,testing,production

<IfModule env_module>
    SetEnv CI_ENV development
</IfModule>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...