清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
|
Controller当中可使用的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当中可使用的render方法
//只显示view
$this->render('about.php',['test'=>5]);
//显示指定的文件,和Controller里面的renderFile功能一样,其实它就是Controller里面的方法调用的这个方法
$this->renderFile('full file name',['test'=>5])
//显示指定的文件,和上面的区别,这个只能指定php文件,上面的可以指定其它模板引擎所使用的view文件
$this->renderPhpFile('full file name',['test'=>5]);
//和Controller里面的功能一样
$this->renderAjax('about',['test'=>5])
在线播放下载地址 |
扫码二维码 获取免费视频学习资料

- 本文固定链接: http://www.phpxs.com/j/yii2/1001039/
- 免费: Python视频资料获取