php mvc tutorial
DESCRIPTION
TRANSCRIPT
PHP MVC TutorialJust Do It Class01
BruceYang
Why?
來源:http://www.agileapps.co.uk/platform/mvc-architecture.html
How?
1.簡單實作PHP MVC 架構 !
2.PHP MVC Framework
簡單實做PHP MVC
• View
• Model
• Controller
View<?php
class testView{
function display($data){
echo $data;
}
}
?>
Model<?php
class testModel{
function get(){
return "Hello World";
}
}
?>
Controller<?php
!
class testController
{
function show(){
$testModel = new testModel();
$data = $testModel->get();
$testView = new testView();
$testView->display($data);
}
}
?>
Controller<?php
!
class testController
{
function show(){
$testModel = new testModel();
$data = $testModel->get();
$testView = new testView();
$testView->display($data);
}
}
?>
Test<?php
require_once('testController.class.php');
require_once('testModel.class.php');
require_once('testView.class.php');
!
$testController = new testController();
$testController->show();
?>
Tack a Break...
PHP MVC Framework百家爭鳴~
那我們該如何選擇呢?
其實我也不知道?
7 Best PHP Frameworks for 2014
來源:http://www.tisindia.com/blog/7-best-php-frameworks-2014/
PHP MVC Framework 實作
–BruceYang
“Thank you for listening…”