<?php
session_start();
$id=session_id();
if(file_exists('/tmp/sess_'.$id)) echo 'session file exist';
?>
session_start();
$id=session_id();
if(file_exists('/tmp/sess_'.$id)) echo 'session file exist';
?>
session_start();
$id=session_id();
$path=session_save_path();
if(file_exists($path.'/sess_'.$id)) echo 'session file exist';
?>
if(file_exists($path.'/sess_'.$id)) echo 'session file exist';
这两名不明白什么意思!
if(file_exists($path.'/sess_'.$id)) // 检查session_id对应的文件是否存在
echo 'session file exist';