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

WBOY
풀어 주다: 2016-06-13 12:07:25
원래의
564명이 탐색했습니다.

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 />
로그인 후 복사



------解决思路----------------------
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);
로그인 후 복사
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 />
로그인 후 복사

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

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