如何将参数传递给包含的视图模板?
控制器
public function action_index3()
{
$view = View::factory('view1');
$view ->set('name','Tokyo');
$view ->set('age','1980');
$this->response->body($view);
}
view1.php
<?php
include 'view2.php';
?>
<?php echo $name; ?><?php echo $age; ?>
如何将变量传递给模板 view2.php?只有 GET 包含 'view2.php?name='+val?