을 태스크.
A) 모델 (들) (선택, 당신은)
<?php
class MyModel() {
}
?>
b)는 PHP에서 배열을 사용하여 경로 (index.php를?)
<?php
include "...";
// here we collects all the information, such post,get and path values
$action=...;
$param=....;
switch($controller) {
case "my": // www.myweb.com/my/action
include "controller\MyController.php"; // open the right controller.
break;
}
?>
C) 컨트롤러
<?php
include "model\MyModel.php";
switch($action) {
case "add":
// here live the logic, information, call for services and such.
$model=....;
// and finally...
include "view\MyView.php";
break;
}
?>
d)보기
<html>
<body>
<?=$model->field;?>
</body>
<html>
참고 사항 :
a) 가능한 한 깨끗한 화면이어야합니다. php를 신경 쓰지 않는 웹 디자이너가 뷰를 생성 할 수 있다고 생각하십시오.
b)보기는 항상 프로세스의 마지막 단계입니다. 뷰 웹은 항상 아무 것도 반환하지 않습니다.
http://tutorialzine.com/2011/08/jquery-mobile-product-website/ 할일 목록 사이트는 아니지만 MVC 패턴을 사용하는 사이트입니다. – Kheldar
평소와 같이 작성한 후 나중에 MVC로 전송하십시오. 이 작업을 몇 번하면 곧 프로젝트의 시작에서 MVC 패턴으로 시작할 수 있습니다. – chelmertz