look双
2016-02-06 15:54
<?php
class testController{
function show(){
$testModel = new testModel();
$data = $testModel -> get();
$testView = new testView();
$testView -> display($date);
}
}
?>
<?php
class testModel{
function get(){
return "hello world";
}
}
?><?php
class testView{
function display($date){
echo $date;
}
}
?><?php
require_once('testController.class.php');
require_once('testModel.class.php');
require_once('testView.class.php');
$testController = new testController();
$testController->show();
?>
data




打开php报错了吗,是否是错误,没有显示呢
你所有的文件是不是都放在同一个目录中?
你所有的文件是不是都放在同一个目录中?
MVC架构模式分析与设计
82448 学习 · 954 问题
相似问题