TEL:400-8793-956
当前位置:程序、服务器

CakePHP2.3中的SSL身份验证登录脚本

提问者: 近期获赞: 浏览人数: 发布时间:2020-12-20 15:09:23

 问:(https)SSL身份验证登录脚本,在CakePHP2.3 Linux服务器中使用,但可以正常的http格式正常工作,请您帮我解决此问题,

 
 
答:请使用以下代码登录:-
 
公共功能login(){
            如果($ this-> Session-> read('Auth.User')){
                $ this-> Session-> setFlash('您已登录!');
                返回$ this-> redirect('/');
            }
            如果($ this-> request-> is('post')){
                如果($ this-> Auth-> login()){
                    返回$ this-> redirect($ this-> Auth-> redirect());
                }
                $ this-> Session-> setFlash(__('您的用户名或密码不正确。'));
            }
        }
请检查并让我知道是否有效,
谢谢
上一篇: get_magic_quotes_gpc()函数已弃用,请帮助
下一篇: 如何从PHP客户端使用Asp.net Web服务