> 백엔드 개발 > PHP 튜토리얼 > 使用codeigniter出现404有关问题

使用codeigniter出现404有关问题

WBOY
풀어 주다: 2016-06-13 10:25:45
원래의
1577명이 탐색했습니다.

使用codeigniter出现404问题
各位好,初使用codeigniter出现了如下问题:

1、windows xp下运行正常,linux下运行出现404错误。
2、访问主页可以显示(http://ip地址/项目名/或http://ip地址/项目名/index.php/index),但是点登录时(http://ip地址/项目名/index/login)出现404错误,index控制器中是存在public的login方法。
3、linux环境为red hat 企业版5 ,apache为2.0.64,php为5.4.3 apache配置了rewrite也 加了path info

尝试过修改config.php中的uri_request 为各个可能的值(query_string,auto等)现象依旧。

看codeigniter的日志似乎login.php已经发送到浏览器了,但是为什么还是404呢

同样的程序在windows下没有问题,请问大家问题可能出在哪里呢?谢谢!
附codeigniter日志:
DEBUG - 2012-06-01 09:42:54 --> Config Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Hooks Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Utf8 Class Initialized
DEBUG - 2012-06-01 09:42:54 --> UTF-8 Support Enabled
DEBUG - 2012-06-01 09:42:54 --> URI Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Router Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Output Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Security Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Input Class Initialized
DEBUG - 2012-06-01 09:42:54 --> XSS Filtering completed
DEBUG - 2012-06-01 09:42:54 --> Global POST and COOKIE data sanitized
DEBUG - 2012-06-01 09:42:54 --> Language Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Loader Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Controller Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: form_helper
DEBUG - 2012-06-01 09:42:54 --> Form Validation Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: string_helper
DEBUG - 2012-06-01 09:42:54 --> Encrypt Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Database Driver Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Session routines successfully run
DEBUG - 2012-06-01 09:42:54 --> DX Auth Initialized
DEBUG - 2012-06-01 09:42:54 --> Session class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/dx_auth.php
DEBUG - 2012-06-01 09:42:54 --> Language file loaded: language/japanese/dx_auth_lang.php
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> Model Class Initialized
DEBUG - 2012-06-01 09:42:54 --> utilityies class already loaded. Second attempt ignored.
DEBUG - 2012-06-01 09:42:54 --> Helper loaded: url_helper
DEBUG - 2012-06-01 09:42:54 --> Config file loaded: application/config/access_limit.php
ERROR - 2012-06-01 09:42:54 --> Severity: Notice --> Undefined variable: message /usr/local/apache2/htdocs/tab/application/views/login.php 44
DEBUG - 2012-06-01 09:42:54 --> File loaded: application/views/login.php
DEBUG - 2012-06-01 09:42:54 --> Final output sent to browser
DEBUG - 2012-06-01 09:42:54 --> Total execution time: 0.0547


------解决方案--------------------
先尝试一下这样是否可以
http://ip地址/项目名/index.php/index/login
http://ip地址/项目名/index.php/login

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿