码迷,mamicode.com
首页 > 其他好文 > 详细

YII总结学习6(在一个视图中显示另外一个视图)

时间:2016-05-17 19:40:44      阅读:125      评论:0      收藏:0      [点我收藏+]

标签:

controller\hello
<?php
    namespace app\controllers;

    use yii\web\Controller;

    class helloController extends Controller
    {

        public function actionIndex(){
        
            return $this->renderPartial("index");
        
        }
    }
?>


view\hello\about.php
    hello about!
    <?=$v_hello_str;?>

view\hello\index.php
    hello index!
    <?php echo $this->render("about",array("v_hello_str"=>"hello world!"));?><!--视图组件 $this -->

 

YII总结学习6(在一个视图中显示另外一个视图)

标签:

原文地址:http://www.cnblogs.com/isuben/p/5502699.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!