public static function func_test($func, $args) { ob_start(); $ret = FW\Common::json_call($args, $func, false); $output = ob_get_clean(); return ['ret' => $ret, 'output' => \json_decode($output, true)]; }
/** * 使用Ajax方式调用指定方法 * * @param mixed $post 方法的参数 * @param string $call 调用的方法 */ public function json_call($post, $call, $die = true) { $call = strval($call); Common::json_call($post, [$this, $call], $die); if ($die) { die(0); } }