How to work with session variables in php mvc pattern
I just found out that I loose any reference to the session array if I create 开发者_运维知识库a new view and try to set a session variable in the controller. The array just comes out as empty. I actually try to use the session array to store the post vars from a multistep registration form. This was actually working when the php was spachetticode, but now that I dumpt everything in a mvc pattern, it is not functioning anymore. Can anyone explain what is going om here and possibly offer a solution om how to work with the session array? Thanks in adv, Richard
Session mechanism has nothing to do with any design pattern. It should work with any.
No, noone can explain you what is going on. Only debugging can tell you.
Here we can only guess. Did you turn power on have session_start() on every page working with the session?
put the session_start(); on index.php
精彩评论