NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
视图` index2.php`和`common.php` ***** index2.php代码 ``` <h1>hello index2</h1> <?php $this->beginBlock('block1'); ?> <h1>this is index2 block</h1> <?php $this->endBlock();?> ``` ***** common.php代码 ``` <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <!-- <h1>hello common</h1>--> <?php if(isset($this->blocks['block1'])):?> <?= $this->blocks['block1']?> <?php else:?> <h1>hello common</h1> <?php endif;?> <?=$content;?> </body> </html> ```