Re: [請益] 關於MVC 中使用Zend_Registry

看板PHP作者 (acer)時間18年前 (2007/11/22 23:23), 編輯推噓0(004)
留言4則, 1人參與, 最新討論串2/2 (看更多)
-- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.225.52.161

11/22 22:51,
離開設定的action? 你怎麼去set的?
11/22 22:51
class fooController extends Zend_Controller_Action { function barAction(){ .... Zend_Registry::set('index',$key); } function chaAction(){ Zend_Registry::isRegistered('index'); //false } } 然而在index.php中set給registry的東西都還在 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.225.34.117

11/22 23:41, , 1F
Zend_Registry::isRegistered($index); 不是'index'
11/22 23:41, 1F

11/22 23:45, , 2F
回應錯誤!手冊的範例有錯~我測試也不work,改回'index'
11/22 23:45, 2F

11/22 23:46, , 3F
但是我Zend_Registry在其它類是正常的.
11/22 23:46, 3F

11/22 23:48, , 4F
你可以加入ZF的MSN群,來問你的問題,group57479@xiaoi.com
11/22 23:48, 4F
文章代碼(AID): #17HPy0h2 (PHP)
文章代碼(AID): #17HPy0h2 (PHP)