U
U
Uniq2018-02-22 21:17:28
PHP
Uniq, 2018-02-22 21:17:28

How to read array from session file?

# если делать таким способом выдает ошибку:
# unserialize(): Error at offset 0 of 240 bytes
            $s = file_get_contents(config::DIR_SESSION.'/sess_'.$id);
            $session = unserialize($s);

session file
xxxxx|O:8:"stdClass":6:{s:5:"login";s:7:"xxxx";s:6:"lastIP";s:9:"127.0.0.1";s:11:"accessLevel";s:3:"xxxx";s:5:"email";s:15:"xxxx";s:9:"social_id";s:1:"0";s:8:"password";s:28:"xxx=";}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2018-02-22
@VladimirAndreev

$_SESSION than does not suit?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question