|
c中
content.php
$data['test1']="测试1";
$this->load->view('header',$data);
$this->load->view('content',$data);
header.php
$data['test2']="测试2";
$this->load->view('header',$data);
v中
contetnt.php
<?php echo $test1 ?>
header.php
<?php echo $test2;?>
content.php运行时
Undefined variable: test2
|
|