如题所述
session_start();
// ä¿åä¸å¤©
$lifeTime = 24 * 3600;
setcookie(session_name(), session_id(), time() + $lifeTime, "/");
// ä¿åä¸å¤©
$lifeTime = 24 * 3600;
setcookie(session_name(), session_id(), time() + $lifeTime, "/");
温馨提示:答案为网友推荐,仅供参考
第1个回答 2015-09-22
<?php
session_start();
if(isset($_SESSION['username'])){
echo 'YOU are Logged as '.$_SESSION['username'].'<br>';
echo '<a href="logOut.php"> Log Out('.$_SESSION['username'].')</a>';
}本回答被网友采纳
session_start();
if(isset($_SESSION['username'])){
echo 'YOU are Logged as '.$_SESSION['username'].'<br>';
echo '<a href="logOut.php"> Log Out('.$_SESSION['username'].')</a>';
}本回答被网友采纳