名称: _SESSION
功能: 读取用户会话信息(与PHP的$_SESSION变量用法一致)
调用示例:
{if(isset($_SESSION['user_id']) && $_SESSION['user_id'])} <li><a href="member-account.html">{$_SESSION['username']}</a></li> <li><a href="javascript:void(0);" onclick="apps['member-exit']();">退出</a></li> {else} <li><a href="login-page.html">登录</a></li> {/if}
SESSION数据格式参考:
Array ( [user_id] => 1 [date] => 2020-02-19 23:26:31 [mail_captcha_stime] => 1582154732 [email] => 973432@qq.com [username] => ebers [phone] => [reg_time] => 1528293984 [last_login] => 1582069142 [login_count] => 30 [status] => 0 )