window.location = './index.php'; "; return; } } catch (Exception $e) { $errorMessage = $e->getMessage(); } self::view('login.tpl', compact('redirectToHome', 'errorMessage')); } public static function debug() { if (self::_checkGrant()) { self::view(__FUNCTION__ . ".tpl"); } else { self::login(); } } public static function monitor() { if (self::_checkGrant()) { self::view(__FUNCTION__ . ".tpl"); } else { self::login(); } } public static function call() { if (self::_checkGrant()) { $params = loyalsoft\query_paras(); $className = $params['className']; $mname = $params['method']; if ($className && $mname) { include_once __DIR__ . '/../../../App/Services/' . str_replace("loyalsoft\\", "", $className) . '.php'; # 直接向客户端输出返回值 $rt = new RenderTime(); ob_start(); $result = call_user_func_array(array($className, $mname), array_values($_POST)); $content = ob_end_flush(); $rt->end(); if (strlen($content) > 0) { echo("输出: " . $content); } echo "