代码拉取完成,页面将自动刷新
<?php
set_include_path(__DIR__ ."/include" . PATH_SEPARATOR .
get_include_path());
require_once "autoload.php";
require_once "sessions.php";
require_once "functions.php";
Config::sanity_check();
startup_gettext();
$script_started = microtime(true);
if (!init_plugins()) return;
$span = OpenTelemetry\API\Trace\Span::getCurrent();
$method = (string)clean($_REQUEST["op"]);
// shortcut syntax for public (exposed) methods (?op=plugin--pmethod&...params)
if (strpos($method, PluginHost::PUBLIC_METHOD_DELIMITER) !== false) {
list ($plugin, $pmethod) = explode(PluginHost::PUBLIC_METHOD_DELIMITER, $method, 2);
// TODO: better implementation that won't modify $_REQUEST
$_REQUEST["plugin"] = $plugin;
$_REQUEST["pmethod"] = $pmethod;
$method = "pluginhandler";
}
$override = PluginHost::getInstance()->lookup_handler("public", $method);
if ($override) {
$handler = $override;
} else {
$handler = new Handler_Public($_REQUEST);
}
if (strpos($method, "_") === 0) {
user_error("Refusing to invoke method $method which starts with underscore.", E_USER_WARNING);
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
$span->setAttribute('error', Errors::E_UNAUTHORIZED);
return;
}
if (implements_interface($handler, "IHandler") && $handler->before($method)) {
$span->addEvent("construct/$method");
if ($method && method_exists($handler, $method)) {
$reflection = new ReflectionMethod($handler, $method);
if ($reflection->getNumberOfRequiredParameters() == 0) {
$span->addEvent("invoke/$method");
$handler->$method();
} else {
user_error("Refusing to invoke method $method which has required parameters.", E_USER_WARNING);
header("Content-Type: text/json");
print Errors::to_json(Errors::E_UNAUTHORIZED);
$span->setAttribute('error', Errors::E_UNAUTHORIZED);
}
} else if (method_exists($handler, 'index')) {
$span->addEvent("index");
$handler->index();
}
$span->addEvent("after/$method");
$handler->after();
return;
}
header("Content-Type: text/plain");
print Errors::to_json(Errors::E_UNKNOWN_METHOD);
$span->setAttribute('error', Errors::E_UNKNOWN_METHOD);
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。