用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2952|回复: 6
收起左侧

提交登陆表单,总是停留在登陆页,site_url好像没启作用

[复制链接]
发表于 2013-2-26 16:07:49 | 显示全部楼层 |阅读模式
最近移植一个项目到linux平台

本地环境登陆测试没问题,但是linux平台的就有问题,好像site_url没起作用

表单中是这么写的。

PHP复制代码
 
<form action="<?php echo site_url('login/mlogin');?>" method="POST">
 
复制代码


mlogin方法也没有走到,点登陆后,页面还是跳转到登陆页

以下是log:

PHP复制代码
 
DEBUG - 2013-02-26 15:16:49 --> Config Class Initialized
DEBUG - 2013-02-26 15:16:49 --> Hooks Class Initialized
DEBUG - 2013-02-26 15:16:49 --> Utf8 Class Initialized
DEBUG - 2013-02-26 15:16:49 --> UTF-8 Support Enabled
DEBUG - 2013-02-26 15:16:50 --> URI Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Router Class Initialized
DEBUG - 2013-02-26 15:16:50 --> No URI present. Default controller set.
DEBUG - 2013-02-26 15:16:50 --> Output Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Security Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Input Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Global POST and COOKIE data sanitized
DEBUG - 2013-02-26 15:16:50 --> Language Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Loader Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Helper loaded: url_helper
DEBUG - 2013-02-26 15:16:50 --> Database Driver Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Session Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Helper loaded: string_helper
DEBUG - 2013-02-26 15:16:50 --> Session routines successfully run
DEBUG - 2013-02-26 15:16:50 --> Pagination Class Initialized
DEBUG - 2013-02-26 15:16:50 --> User Agent Class Initialized
DEBUG - 2013-02-26 15:16:50 --> Controller Class Initialized
DEBUG - 2013-02-26 15:16:50 --> File loaded: application/views/login.php
DEBUG - 2013-02-26 15:16:50 --> Final output sent to browser
DEBUG - 2013-02-26 15:16:50 --> Total execution time: 0.0412
---------------------------------------------------------------------------
DEBUG - 2013-02-26 15:16:57 --> Config Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Hooks Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Utf8 Class Initialized
DEBUG - 2013-02-26 15:16:57 --> UTF-8 Support Enabled
DEBUG - 2013-02-26 15:16:57 --> URI Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Router Class Initialized
DEBUG - 2013-02-26 15:16:57 --> No URI present. Default controller set.
DEBUG - 2013-02-26 15:16:57 --> Output Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Security Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Input Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Global POST and COOKIE data sanitized
DEBUG - 2013-02-26 15:16:57 --> Language Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Loader Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Helper loaded: url_helper
DEBUG - 2013-02-26 15:16:57 --> Database Driver Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Session Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Helper loaded: string_helper
DEBUG - 2013-02-26 15:16:57 --> Session routines successfully run
DEBUG - 2013-02-26 15:16:57 --> Pagination Class Initialized
DEBUG - 2013-02-26 15:16:57 --> User Agent Class Initialized
DEBUG - 2013-02-26 15:16:57 --> Controller Class Initialized
DEBUG - 2013-02-26 15:16:57 --> File loaded: application/views/login.php
DEBUG - 2013-02-26 15:16:57 --> Final output sent to browser
DEBUG - 2013-02-26 15:16:57 --> Total execution time: 0.0384
 
复制代码


上半部分是加载登陆页,即login.php

下半部分是点击提交后的log,又重新加载了login.php

奇怪的问题,望大家多多指教,不胜感激。
发表于 2013-2-26 16:50:31 | 显示全部楼层
直接用firebug看http请求
是不是开启了csrf检测
 楼主| 发表于 2013-2-26 17:08:10 | 显示全部楼层
mark35 发表于 2013-2-26 16:50
直接用firebug看http请求
是不是开启了csrf检测

看过了,点击登陆,响应部分还是当前的登陆页。没有真正提交到指定action.
 楼主| 发表于 2013-2-27 14:15:52 | 显示全部楼层
hex帮忙看看呀,多谢
发表于 2013-2-27 17:19:47 | 显示全部楼层
绝对路径问题?
 楼主| 发表于 2013-2-27 21:38:23 CI中国手机版 | 显示全部楼层
harbinseo 发表于 2013-2-27 17:19:47
绝对路径问题?

都是对的,奇怪了来自: Android客户端
 楼主| 发表于 2013-2-28 14:49:53 | 显示全部楼层
目前有一种临时解决办法,暂时用.htaccess隐藏掉index.php

否则,无论访问任何控制器,都会跳转到默认控制器

本版积分规则