0
我在與會話處理問題值2Zend框架2不能在Zend框架檢索會議
爲什麼$會話級>帶寬alwas「空」在fileAction在beaconAction設置之後?
public function fileAction() {
$session = new SessionContainer();
$bandwidth = $session->bandwidth;
var_dump($session->bandwidth);
die;
$settings = $this->getSettings();
$this->lightbox($this);
return new ViewModel(array(
'file' => $this->getEvent()->getRouteMatch()->getParam('file'),
'film_path' => $settings['film_path'],
'poster_file' => $settings['poster_file'],
));
}
public function beaconAction() {
$session = new SessionContainer();
$bandwidth = $this->getRequest()->getQuery('bw');
$session->bandwidth = $bandwidth;
var_dump($session->bandwidth);
return new ViewModel(array(
'bandwidth' => $bandwidth
));
}
同在這裏:http://www.zfforum.de/zf2-einsteigerfragen/12816- session-immer-null.html – nofreeusername