/** * To return instance * @return API_Route */ public static function getInstance() { if (is_null(self::$instance)) { $class = __CLASS__; self::$instance = new $class(); } return self::$instance; }
<?php /*----------------------------------------------------------------- !!!!警告!!!! 以下为系统文件,请勿修改 -----------------------------------------------------------------*/ //不能非法包含或直接执行 if (!defined("IN_BAIGO")) { exit("Access Denied"); } include_once BG_PATH_FUNC . "init.func.php"; //管理员通用 fn_init(true, false, "Content-type: application/json", true, "ajax"); include_once BG_PATH_CONTROL . "api/user.class.php"; //载入商家控制器 $api_user = new API_USER(); //初始化商家 switch ($GLOBALS["act_post"]) { case "reg": $api_user->api_reg(); break; case "login": $api_user->api_login(); break; case "edit": $api_user->api_edit(); break; case "mailbox": $api_user->api_mailbox(); break; case "nomail":
/*----------------------------------------------------------------- !!!!警告!!!! 以下为系统文件,请勿修改 -----------------------------------------------------------------*/ //不能非法包含或直接执行 if (!defined("IN_BAIGO")) { exit("Access Denied"); } include_once BG_PATH_INC . "common_api.inc.php"; //验证是否已登录 include_once BG_PATH_CONTROL . "api/user.class.php"; //载入商家控制器 $api_user = new API_USER(); //初始化商家 switch ($GLOBALS["act_post"]) { case "reg": $api_user->api_reg(); break; case "login": $api_user->api_login(); break; case "edit": $api_user->api_edit(); break; case "del": $api_user->api_del(); break; default: