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