Index.php PHP // Controller section $ TEST = New class_test; $ test-> set_username ('Hello, World!'); $ TPL = New class_tpl ('tpl.htm'); $ TPL-> setvar ( 'Title', 'phpmvc'; $ TPL-> Setvar ('MSG', 'Test'); $ TPL-> PARSE (); // View section // View section class class_tpl {var $ p_tpl; function class_tpl $ filename) {$ fH = fopen ($ flyname, "r"); $ this-> p_tpl = fread ($ fh, filesis); fclose ($ fh);} Function setvar ($ T, $ V ) {$ This-> p_tpl = str_replace ('{'. $ T. '}', $ V, $ this-> p_tpl);} Function Parse () {Print $ this-> p_tpl;}} // Model section // part of the model class class_test {var $ model_test; function class_test () {$ this-> model_test = new model_test;} function set_username ($ value) {$ this-> model_test-> username = $ value;} function get_username () {RETURN $ this-> model;}}} // Property class home model section section // Attribute class home model section class model_test {var $ usrname = ';}?> Index.htm