sam 发表于 2013-2-26 16:07:49

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

最近移植一个项目到linux平台

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

表单中是这么写的。


<form action="<?php echo site_url('login/mlogin');?>" method="POST">


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

以下是log:


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

奇怪的问题,望大家多多指教,不胜感激。

mark35 发表于 2013-2-26 16:50:31

直接用firebug看http请求
是不是开启了csrf检测

sam 发表于 2013-2-26 17:08:10

mark35 发表于 2013-2-26 16:50 static/image/common/back.gif
直接用firebug看http请求
是不是开启了csrf检测

看过了,点击登陆,响应部分还是当前的登陆页。没有真正提交到指定action.

sam 发表于 2013-2-27 14:15:52

hex帮忙看看呀,多谢

harbinseo 发表于 2013-2-27 17:19:47

绝对路径问题?

sam 发表于 2013-2-27 21:38:23

harbinseo 发表于 2013-2-27 17:19:47 static/image/common/back.gif
绝对路径问题?

都是对的,奇怪了

sam 发表于 2013-2-28 14:49:53

目前有一种临时解决办法,暂时用.htaccess隐藏掉index.php

否则,无论访问任何控制器,都会跳转到默认控制器
页: [1]
查看完整版本: 提交登陆表单,总是停留在登陆页,site_url好像没启作用