MVC是模型(model)-视图(view)-控制器(controller)的缩写,它的作用是使代码分离,可维护性高.重用性高 编写Model层: <?php class model{ public function getData(){ return "I am from model"; } } 编写view层: <?php class view{ public function display($data){ echo $data; } } 编写controller层:…
var ss = Server.MapPath(""); //C:\Users\Administrator\Desktop\Csharp测试程序\TestMVC\TestMVC ss = ss + "/bin/index.html"; using (StreamReader sr = new StreamReader(ss, System.Text.Encoding.GetEncoding("gb2312"))) //以gb2312编码方式读取…