清華大佬耗費(fèi)三個(gè)月吐血整理的幾百G的資源,免費(fèi)分享!....>>>
Controller當(dāng)中可使用的render方法
//顯示view和layout $this->render('about.php',['test'=>5]); //只顯示view $content = $this->renderPartial('about',['test'=>5]); //只顯示layout $this->renderContent($content); //顯示指定的文件 $this->renderFile('full file name',['test'=>5]); //只顯示view(包含Head Body) $this->renderAjax('about',['test'=>'test']);
View當(dāng)中可使用的render方法
//只顯示view $this->render('about.php',['test'=>5]); //顯示指定的文件,和Controller里面的renderFile功能一樣,其實(shí)它就是Controller里面的方法調(diào)用的這個(gè)方法 $this->renderFile('full file name',['test'=>5]) //顯示指定的文件,和上面的區(qū)別,這個(gè)只能指定php文件,上面的可以指定其它模板引擎所使用的view文件 $this->renderPhpFile('full file name',['test'=>5]); //和Controller里面的功能一樣 $this->renderAjax('about',['test'=>5])
在線(xiàn)播放下載地址 |
掃碼二維碼 獲取免費(fèi)視頻學(xué)習(xí)資料
- 本文固定鏈接: http://www.wangchenghua.com/j/yii2/1001039/
- 免費(fèi): Python視頻資料獲取