|
<?php
class Blog extends Controller
{
function index()
{
$data['title'] = "My Real Title";
$data['heading'] = "My Real Heading";
$this->load->view('blogview', $data);
}
}
?>
<html>
<head>
<title><?php echo $title;?></title>
</head>
<body>
<h1><?php echo $heading;?></h1>
</body>
</html>
显示:
A PHP Error was encounteredSeverity: Notice
Message: Undefined variable: heading
Filename: views/blogview.php
Line Number: 6 |
|