橡皮人flower
2015-11-29 01:58
如果不是指定的控制器名称应该是用‘test’吧,而不是‘index’,要不拼出来的地址(controller的值我改为543测试) http://localhost/learnMVCnew/index.php?controller=543&method=show,会被拼成indexController.class.php而报错的,所以我是这么写的: $controller=in_array($_GET['controller'],$controllerAllow)?daddslashes($_GET['controller']):'test';
如果是test 就指向 testController.class.php index 就指向 indexController.class.php 看你有没有建立这些控制器了。课程里只带大家做了一个 testController.class.php
MVC架构模式分析与设计
82417 学习 · 929 问题
相似问题