最新回答 / 滄瀾丶
你可以看一下session的內部實現/** * This method is required by the interface [[\ArrayAccess]]. * @param integer $offset the offset to set element * @param mixed $item the element value */public function offsetSet($offset, $item){ ? ?$this->open(); ? ?$_SESSION[$of...
2016-03-09
已采納回答 / 少年掛劍不戴花
我認為布局文件是主體框架的,左右,比如當前這個提問的頁面,上面的導航和下面的尾部就是布局文件,是公用的,所有頁面都會用到,而$this->render('index',$data)方法的作用是顯示當前右側的用戶信息和相關問題的,所以只要傳入用戶信息,就可以加載進當前頁,就是說布局文件是公用的,而$this->render是有選擇的根據當前頁面加載不同的數據用的
2016-01-24