|
Controller
Controller Sample
Phase-Implementation Controller SampleA controller is a simple php class it must extend rpd superclass (so it can inherit $this->db, $this->url and some other system libraries). Conventions/rules:
<?php
class welcome_controller extends rpd {
function index()
{
$vars = array('varname'=>'value');
echo $this->view('welcome',$vars);
}
function test()
{
echo 'test';
}
}
this request: http://website/welcome will parse the View 'welcome' then the result will be printed this other request: http://website/welcome/test will output 'test' |
► Sign in to add a comment