public function login() { //前端传来的参数用quickInput()获取,不管是GET还是POST的,框架会自动过滤数据 //$param = quickInput('userName'); //因为暂时没有前台和数据库,这里模拟一下就好了 $param = 'hello world'; $server = new UserModule(); echo $server->login($param); }
$action = strtolower($_REQUEST['action']); if (!in_array($action, $actions)) { $action = 'login'; } } define('ACTION_NAME', $action); require dirname(__FILE__) . '/core/fanwe.php'; $fanwe =& FanweService::instance(); $fanwe->initialize(); require fimport('module/user'); switch (ACTION_NAME) { case 'logout': UserModule::logout(); break; case 'login': UserModule::login(); break; case 'ajax_login': UserModule::ajaxLogin(); break; case 'register': UserModule::register(); break; case 'ajax_register': UserModule::ajaxRegister(); case 'forgetpassword': UserModule::forgetPassword(); break; case 'resetpassword': UserModule::resetPassword(); break;