【发布时间】:2015-02-27 09:20:45
【问题描述】:
我设计了一个在线购物网站。 http 一切正常。现在我希望配置文件和支付网关应该使用 HTTPS 而不是 HTTP。我以前没有处理过https,所以我被困在这里。这是我的代码 sn-p。我希望 profile.php 使用 https。我看过一些帖子,它被告知要编辑 mod_rewrite 或使用一些 https 重定向功能。但我将如何做到这一点?我正在使用 XAMPP。
if($rws['user_email']==$UserName && $rws['user_pass']==$UserPwd){
if($_REQUEST['remember']==1){
setcookie('uname',$UserName,time()+24*60*60);
setcookie('pwd',$UserPwd,time()+24*60*60);
}
$_SESSION['fname'] = $rws['user_fname'];
$_SESSION['ud'] = $rws['user_id'];
header('Location:profile.php');
}
【问题讨论】:
-
阅读这篇文章 [如何使用 https 保护网站][1] [1]:stackoverflow.com/questions/2205325/…