简体   繁体   English

对于 chrome Incognito 模式下的 PHP,会话变量 ($this->session->userdata('logged_in');) 为空

[英]For PHP in chrome Incognito mode session variable ($this->session->userdata('logged_in');) is null

 $getdata= $this->input->post();

$session_data = $this->session->userdata('logged_in'); $session_data = $this->session->userdata('logged_in');
print_r("test1".json_encode($session_data)); print_r("test1".json_encode($session_data));

The following are the steps to allow cookies for the xyz.com domain in the Chrome browser.以下是在 Chrome 浏览器中允许 xyz.com 域的 cookie 的步骤。

  1. On your computer, open Chrome.在您的计算机上,打开 Chrome。
  2. At the top right, click More(three vertical dots) > Settings.在右上角,单击更多(三个垂直点)> 设置。
  3. Under 'Privacy and security', click Cookies and other site data.在“隐私和安全”下,单击 Cookie 和其他站点数据。
  4. Next to 'Sites that can always use cookies' click Add.单击“始终可以使用 cookie 的站点”旁边的添加。
  5. Enter the web address.输入网址。 [*.]xyz.com [*.]xyz.com
  6. Select Add.选择添加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM