Home >Backend Development >PHP Tutorial >Is there a problem with obtaining a two-dimensional array from Session?
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:
Error report picture:
Template code:
It’s so embarrassing. After updating the framework file, just delete the cache and it will be fine. Posted