為什么會報這個錯Parse error: syntax error, unexpected '}' in D:\phpStudy\WWW\MVC\function.php on line 13 大神指點(diǎn)一下
<?php
?? ?function C($name, $method){
?? ??? ?require_once('/libs/Controller/'.$name.'Controller.class.php');
?? ??? ?// $testController=new testController();
?? ??? ?// $testController->show();
?? ??? ?eval('$obj = new '.$name.'Controller();$obj->'.$method.'();')
?? ??? ?
?? ??? ?/* eval()函數(shù)調(diào)用簡單但是不安全
?? ??? ??? 可用下面代碼代替:
?? ??? ???? $controller=$name.'Controller';
?? ??? ??? ?$obj = new $controller;
?? ??? ??? ?$obj->$mothod(); */
?? ?}
?? ?
?? ?function M($name){
?? ??? ?require_once('/libs/Model/'.$name.'Model.class.php');
?? ??? ?//$testModel = new testModel();
?? ??? ?eval('obj = new '.$name.'Model();')
?? ??? ?return $obj;
?? ??? ?
?? ??? ?/* $model=$name.'Model';
?? ??? ??? ?$obj = new $model(); */
?? ?}
?? ?
?? ?function V($name){
?? ??? ?require_once('/libs/View/'.$name.'View.class.php');
?? ??? ?
?? ??? ?eval('$obj = new '.$name.'View();')
?? ??? ?return $obj;
?? ?}
?? ?
?? ?function daddslashes($str){
?? ??? ?return (!get_magic_quotes_gpc())?addslashes($str):$str;
?? ?}
?? ??? ??? ??>
2018-09-22
少了個結(jié)束符
2018-09-22
語法錯誤吧、你仔細(xì)看看