<?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()函数调用简单但是不安全
可用下面代码代替:
$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;
}
?>
少了个结束符
语法错误吧、你仔细看看