THINKPHP网站登录页在本地测试可以通常登录,在服务器却无法正常跳转

WBOY
Release: 2016-06-13 12:07:25
Original
578 people have browsed it

THINKPHP网站登录页在本地测试可以正常登录,在服务器却无法正常跳转
为什么我的网站登录页在本地测试可以正常登录,在服务器却无法正常跳转呢?

<br /><form action="{:U('Login/login')}" method="post"><br />                        <ul><br />                            <li><img src="__PUBLIC__/frontend/images/login_name_bg.gif" alt=""  title="用户名"/><br />                                <input type="text" class="denglu_srk" placeholder="用户名/邮箱/手机号" value="<?php echo $_COOKIE['username'];?>"  name="name"    style="max-width:90%"/><br />                            </li><br />                            <li><img src="__PUBLIC__/frontend/images/login_password_bg.gif" alt=""  title="密码"/><br />                                <input type="password" class="denglu_srk" placeholder="密码" onpaste="return false" name="pass" id="pass_id"    style="max-width:90%"/><br />                            </li><br />                            <?php if($_SESSION['login_time']>=3):?><br />                            <li><input placeholder="输入验证码" class="yanzhengma" name="verify"/><img  class="verify-code" src="{:U('Register/verify')}" onClick="click_change(this)"   style="max-width:90%" title="验证码"/ alt="THINKPHP网站登录页在本地测试可以通常登录,在服务器却无法正常跳转" ><b id="verify1"></b></li><br />                            <?php endif;?><br />                        </ul><br />                        <p><a href="{:U('FindPass/email')}">忘记密码?</a><a href="{:U('Register/index')}">免费注册</a></p><br />                        <div class="denglu_but_con"><input class="denglu_but" type="submit" value=" "/></div><br />                    </form><br />
Copy after login



------解决思路----------------------
url 重写没有生效
------解决思路----------------------
还可能是 session 无效
------解决思路----------------------
不对!
http://www.onloan.com.cn/usercontent-index.html
会转到
http://www.onloan.com.cn/login-index.html

所以要么是登录程序有问题(无法确认是用户),要么是 session 失效
------解决思路----------------------
session保存目录可写?
------解决思路----------------------
大麦加油!关注、学习!
------解决思路----------------------
也可能是你的服务器 php 版本低了
$url = 'http://www.onloan.com.cn/usercontent-index.html';<br />print_r(get_headers($url));<br />echo file_get_contents($url);
Copy after login
Array<br />(<br />    [0] => HTTP/1.1 200 OK<br />    [1] => Date: Sun, 05 Oct 2014 05:57:52 GMT<br />    [2] => Content-Type: text/html<br />    [3] => Content-Length: 265<br />    [4] => Connection: close<br />    [5] => Server: nginx/1.0.15<br />    [6] => X-Powered-By: PHP/5.2.17p1<br />)<br /><head><br /><meta property="qc:admins" content="147026777767647166375636" /><br /><meta property="qc:admins" content="4716300527622221636375" /><br /><meta property="qc:admins" content="471630043674556654" /><br /></head><br /><br /><br /><meta http-equiv='Refresh' content='0;URL=/login-index.html'><br />
Copy after login

------解决思路----------------------
再有,你的服务器用的是 nginx
能支持 .htaccess 吗?
------解决思路----------------------
你在登录页打印一下传入的参数看看
这样无目标的瞎猜是没有用的

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!