game2002api/webapp/index.php
wangwei01 0bd95356b7 1
2019-07-08 15:01:32 +08:00

30 lines
570 B
PHP

<?php
require 'bootstrap/init.php';
if (empty($_REQUEST['c']) || empty($_REQUEST['a'])) {
die();
return;
}
function autoload_controller__($classname)
{
require_once "controller/$classname.class.php";
spl_autoload_unregister('autoload_controller__');
}
spl_autoload_register('autoload_controller__');
function loginVerify($accountid, $sessionid)
{
return true;
}
try{
$c = $_REQUEST['c'];
$a = $_REQUEST['a'];
$classname = $c .'Controller';
$obj = eval('return (new $classname())->$a();');
} catch (Exception $e){
echo($e);
}