class Controller{? ? ?# 控制器基類
? ? ? public function show(){? ? ? ?# 加載視圖頁(yè)面?
? ? ? ? ? ? ?require "./App/".PLATFORM."/View/".CONTROLLER."/".ACTION.".php";
? ? ?}
}
老鐵們,穩(wěn)!
以上代碼用了之后會(huì)導(dǎo)致Model層數(shù)據(jù)失效,所以修改了一下:
將以下代碼放入Model中:
class Model{
# 加載視圖頁(yè)面?
public function show(){
????return "./App/".PLATFORM."/View/".CONTROLLER."/".ACTION.".php";
}
}
調(diào)用
$ind = new IndexModel();
require $ind->show();