时间:2021-07-01 10:21:17 帮助过:7人阅读
session[username]:$username
session[userpass]:$userpass";
}
}
else{
$session[username]="yourid";
$session[userpass]="12345";
if( !session_write() ) {
print $sess_error;
}else{
echo "
session[username]被设置成:$session[username]
" ;
echo "session[userpass]被设置成:$session[userpass]
" ;
echo "测试一下SESSION的作用" ;
}
}
?>
原作者:不详
http://www.bkjia.com/PHPjc/316697.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/316697.htmlTechArticle示例程序:test_session.php3 ?php require( session.inc.php3); require(cookie.inc.php3); ? ?php session_checkid( 20 ); //20分钟后session失效 //下面你需要设置mysql的连...