function daddslashes($str)這個不加就不能用是何原因呀
//我的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);
2015-07-20
$controller = $_GET['controller'];
$method = $_GET['method'];
你直接打印出來看看,你這2個變量是否有值