萌新求帮忙看看
$m=new $module();
$m->$action();
$module=isset($_GET['m'])?$_GET['m']:'Index';
$action=isset($_GET['a'])?$_GET['a']:'Index';
class index{
function _constrcut(){
echo'调用了index控制器<br/>';
}
function index(){
echo'我是index的控制器的index方法';
}
}
exit;
define ('APP_NAME','APP');
define ('APP_PATH','./APP/');
require('./ThinkPHP/ThinkPHP.php');
报错如下:
Notice: Undefined variable: module in D:\phpStudy\PHPTutorial\WWW\index.php on line 13
Fatal error: Class name must be a valid object or a string in D:\phpStudy\PHPTutorial\WWW\index.php on line 13