用於會議在我的網頁,但預期不來輸出我,我正在考慮使用ZendSkeletonApplication和ZfcUser如何通過從視圖控制器值,而不使用錨標記和形式的Zend Framework 2
/done.phtml
$ sessionContainer = new \ Zend \ Session \ Container('myNameSpace');
$ checking =「Got it」;
$ sessionContainer-> myVar = $ checking;
在控制器/ UserController.php
公共職能doneAction()
{
$result=$this->getRequest()->getPost();
$sessionContainer = new \Zend\Session\Container('myNameSpace');
$confirmation=$sessionContainer->myVar;
print_r($confirmation);
return new ViewModel();
}
您的意思是在當前請求中將值傳遞給控制器嗎? – 2013-03-15 12:13:53
yes..when加載done.phtml時,該值希望從視圖傳遞到控制器 – Sheeba 2013-03-15 12:17:18