Home >Backend Development >PHP Tutorial >session过期解决方案

session过期解决方案

WBOY
WBOYOriginal
2016-06-13 10:05:40873browse

session过期

环境是apache+php

A页面 a.htm






B页面 b.php

  session_start();
  if($_GET[k]==1){
  $_SESSION[w]=$_POST[ps];
  echo $_SESSION[w];
  }else{
  echo $_SESSION[w];
  }
  ?>

从a->b能显示正确,但从b后退到a再前进到b就会显示网页已经过期(这中间后退和前进到是指按IE的后退和前进按钮)

------解决方案--------------------
参考
http://www.tsingfeng.com/show-130-1.html

------解决方案--------------------
在网页最前面加上session_cache_limiter('private')
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn