//我的index.php的代码,我在一点点分析老师的做法,去找原因,理逻辑。
我的inde.php代码如下,我在屏蔽掉daddslashes的情况下,就不好用了。
require_once('function.php');
//$controllerAll = array('test','index');
//$methodAll = array('test','index','show');
//$controller = in_array($_GET ['controller'],$controllerAll)?daddslashes($_GET ['controller']):'index';
//$method = in_array ($_GET ['method'],$methodAll)?daddslashes($_GET ['method']):'index';
$controller = $_GET['controller'];
$method = $_GET['method'];
C($controller, $method);
$controller = $_GET['controller'];
$method = $_GET['method'];
你直接打印出来看看,你这2个变量是否有值