About the use of zend\session in the Zend Framework 2, Zendframework
has been puzzled by the use of zend\session, this is the official zend\session of the Chinese version of the tutorial, http://zend-framework-2.yangfan.co/blog/556.
One of the most important is the use of the Zend\session\container class, which is the most important. Container is a container for storing information.
Instantiation of the container,
Use Zend\session\container;
$container = new Container (' namespace ');
$container->item = ' foo ';
Take out an instance of container and instantiate the container with the same name.
$container = new Container ("namespace");
Echo $container->item;
The value is taken out.
Teach a Zend framework to use session problems
Zend does not seem to open it, I was just beginning to see, many do not understand $user = new Zend_session_namespace (' user ');
$user->name = $modelUser->username;
$user->setexpirationseconds (3600);
This is stored directly in the session, for informational purposes only,
How to use Zend Framework to realize user registration and login?
User registration or login should have the corresponding UserInfo information table, the database can read it
As for the question you asked, I think it's how it should be. Retention of information after login
This can be used to save the login session to create a session at any time to read the login information
http://www.bkjia.com/PHPjc/888531.html www.bkjia.com true http://www.bkjia.com/PHPjc/888531.html techarticle with regard to the use of zend\session in the Zend Framework 2, Zendframework has been puzzled by the use of zend\session, which is the Chinese version of the official Zend\session tutorial, HTTP// Zend-framework-2.ya ...