在php.ini中设置,或页面中
session_cache_limiter('private');
session_cache_expire(30); //30 min

解决方案 »

  1.   

    我是这样弄的
    <?
    require './libs/header.php';
    require 'config.php';
    ?>
    header.php
    <?php
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified
    header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1 
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache"); // HTTP/1.0
    ?>
      

  2.   

    重置 PHPSESSID  Cookie 的过期时间...