控制器出來了為什么出不來方法
<?php
error_reporting(0);
$module=isset($_GET['m'])?$_GET['m']:'Index';
$Action=isset($_GET['a'])?$_GET['a']:'Index';
$mooc=new $module;
$mooc->$action();
class index{
? ? function __construct(){
? ? echo '12345<br/>';
? ? }
? ? function index(){
? ? echo '54321';
? ? }
? ? function test(){
? ? echo '54321';
? ? }
}
define('APP_NAME','App');
define('APP_PATH','./App/');
require('./ThinkPHP/Thinkphp.php');
2016-04-26
$Action=isset($_GET['a'])?$_GET['a']:'Index';
$mooc=new $module;
$mooc->$action();
大寫的$Action改成$action