关于Zend Framework 2中 Zend\Session的使用,zendframework
一直迷惑于zend\Session的使用,这个是Zend\Session的官方教程的中文版,http://zend-framework-2.yangfan.co/blog/556。
其中最重要的是关于Zend\Session\Container 类的使用,是最重要的。Container 是存储信息的容器。
Container的实例化,
use Zend\Session\Container;
$container = new Container('namespace');
$container->item = 'foo';
取出Container的实例,实例化同名的Container.
$container = new Container("namespace");
echo $container->item;
就取出值了。
zend好像不用开启吧、我也是刚开始看、好多不懂的$user = new Zend_Session_Namespace('user');
$user->name = $modelUser->username;
$user->setExpirationSeconds(3600);
这个直接存到session里了、仅供参考、
用户注册或登录应该有相应的userinfo信息表,数据库读取就可以了
至于你问的问题我想应该是怎么实现登录后信息的存留
这个可以用session来保存 登录以后建立一个session 随时读取登录信息

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function
