Home >Backend Development >PHP Tutorial >Is there a problem with obtaining a two-dimensional array from Session?

Is there a problem with obtaining a two-dimensional array from Session?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-10-22 12:06:421116browse

First, I store the login information in a two-dimensional array. The test data here is written directlySession::set('qq.nick','I am very happy');Then it should be on the template when fetching it :{$Think.session.qq.nick}Then an error is reported, indicating an undefined array index. When printed out, the compiled result is that the prefix think of the session is missing

To directly print all SESSIONs is array(1) {<br> ["think"] => array(2) {<br> ["__token__"] => string(32) "0396c358d931ab9d1c9917505764c0b6"<br> ["qq"] => array(1) {<br> ["nick"] => string(18) "I am elated"<br> }<br> }<br> }Then the template that reported the error saw the compilation of <?php echo $_SESSION['qq']['nick'];I would like to ask if this is a BUG? I saw a similar problem on the forum last time. I wonder if it has been solved? Today I downloaded the latest coverage from git, but the problem still remains.

Code diagram:
Is there a problem with obtaining a two-dimensional array from Session?
Error report picture:
Is there a problem with obtaining a two-dimensional array from Session?
Template code:
Is there a problem with obtaining a two-dimensional array from Session?

It’s so embarrassing. After updating the framework file, just delete the cache and it will be fine. Posted

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn