Browse Source

cookie有效期修改为30天

pull/9/head
xiaoz 4 years ago
parent
commit
af0443fde2
  1. 2
      controller/login.php

2
controller/login.php

@ -23,7 +23,7 @@ if( $_GET['check'] == 'login' ) {
header('Content-Type:application/json; charset=utf-8'); header('Content-Type:application/json; charset=utf-8');
if( ($user == $username) && ($pass == $password) ) { if( ($user == $username) && ($pass == $password) ) {
$key = md5($username.$password.$ip.'onenav'); $key = md5($username.$password.$ip.'onenav');
setcookie("key", $key, time()+7 * 24 * 60 * 60,"/"); setcookie("key", $key, time()+30 * 24 * 60 * 60,"/");
$data = [ $data = [
'code' => 0, 'code' => 0,
'msg' => 'successful' 'msg' => 'successful'

Loading…
Cancel
Save