0
我在zend框架中使用会话。它是不同的默认会话命名空间中的'默认'和'默认'?
问题是我需要知道的是就在我的应用程序
new Zend_Session_Namespace("default");
和
new Zend_Session_Namespace("Default");
之间的差异,我都用了,好像代码不能正常工作, 如果有差异,那么使用什么是正确的。
这里是我的代码
<?php
class Admin_DashboardController extends Zend_Controller_Action
{
function init()
{
//
}
/**
* Add hotelId to default session
* redirect to admin/hotels if hotelId is not avialble
*/
public function indexAction()
{
$params = $this->getRequest()->getParams();
$hotelid = NULL;
$config_session = new Zend_Session_Namespace("default");
$config_session->hotelid = $params['id'];
if(isset($params['id']) && !empty($params['id'])){
}else{
//redirect user to select hotels page
$redirector = new Zend_Controller_Action_Helper_Redirector();
$url = array(
'action' => 'admin/hotels/index'
);
$redirector->gotoRouteAndExit($url);
}
}
}
邑,我undestand,谢谢............... – 2011-05-24 06:37:31