Skip to content
This repository has been archived by the owner. It is now read-only.

alisharifi01/mvc-4-dummies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP MVC 4 Dummies

A Simple PHP MVC Framework

make Hello World

edit /routes.php

Router::get("/","HomeController","index");

in /controllers make HomeController.php

class HomeController extends BaseController
{
      public function index(){
          $this->templateEngine->set('greeting','hello world');
          $this->templateEngine->display('home.tpl');
      }  
}

in /views/templates make home.tpl

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>hello world</title>
</head>
<body>
    <h1>{$greeting}</h1>
</body>
</html>

About

a simple php mvc framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages