echo '-----------beginBlock--------------------- <br />';
$this->beginBlock('block1',  false);
    echo 'beginBlock demo 1 <br />';
$this->endBlock();
echo $this->blocks['block1'];


$this->beginBlock('block2',  true);
    echo 'beginBlock demo 2 <br />';
$this->endBlock();

echo '-----------beginContent--------------------- <br />';
// 渲染内容,传递给文件
$this->beginContent('@app/views/layouts/main.php',  array('param1'=>'param1_value'));
    echo 'beginContent demo1...';
$this->endContent();


echo '-----------beginCache--------------------- <br />';
if($this->beginCache('beginCache1')){
    echo $this->renderDynamic("echo 'beginCache demo1... <br />';");
    $this->endCache();
}

 

内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!