开发者

Sessions for Multiple Logins account

How does Sessions structure should look like for multiple logins?

There will be three parts of logins on my website.

/ (customer area)

/admin/ (backend/admin area)

/control-panel/ (control panel area)

You can not use same account to access all three.

I came up with like this:

$_SESSION['login']['frontend']开发者_如何学JAVA = array(
    'user_id' => 123,
    'is_logged' => true
        );


$_SESSION['login']['backend'] = array(
    'user_id' => 999,
    'is_logged' => true
        );

Is this correct or what is alternative solution?


Look's perfectly fine to me. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜