http://blog.darkhero.net 個人網誌
http://phorum.study-area.org/index.php/board,31.0.html
公司缺人 PHP 網站程式設計師(中初階學徒可), 熟 MVC 尤嘉~ 請發站內信給我...
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.116.62.60
你寫的不清不楚, 誰知道你的 $session 是在哪裡的?..
是 controller 還是 view ?...
在 controller 中 . 應該是用 $this->Session->read, write 等去處理.
也就是利用 SessionComponent 去處理..
至於什麼時候產生與載入的.請找 Controller 這個..
看他怎麼去處理 $this->components 這個變量.
至於你的那個寫法看起來有點像是在 View 裡面的情況..
也就是用的是 SessionHelper 去存取 session ...
這部份你則也要看 Controller 的程式. 當中像是 $this->helpers 的處理.
而在 CakePHP 中 Session 基本上預設會自動載入的 Component,Helper ..
--
我是上來領便當的...
逛 php 版, database 版只是順便而已...