Buatlah dua(2) buah file masing-masing di apps/controller/helloworld.php dan apps/view/hworld.php kemudian edit file tersebut seperti ini
<?php
class Controller_helloworld extends Panada {
function __construct() {
parent::__construct();
}
function index() {
// data yang akan dikirim ke view
$data = array (
'title' => 'Panada Framework',
'h1' => 'Hello, world with Panada' );
// tampilkan view
$this->view_hworld($data);
}
}
?>
apps/view/hworld.php
<!doctype html>
<html>
<head>
<title><?php echo $title ?></title>
</head>
<body>
<center>
<h1><?php echo $h1 ?></h1>
</center>
</body>
</html>
Tampilan HTML program bisa dilihat
![]() |
| Tampilan Hello World, Panada Framework |

0 comments:
Post a Comment