$instance = $this->app->controller($this->controller,
$this->rule->getConfig('url_controller_layer'),
$this->rule->getConfig('controller_suffix'),
$this->rule->getConfig('empty_controller'));
if ($instance instanceof Controller) {
$instance->registerMiddleware();
}
} catch (ClassNotFoundException $e) {
throw new HttpException(404, 'controller not exists:' . $e->getClass());
}
$this->app['middleware']->controller(function (Request $request, $next) use ($instance) {
// 获取当前操作名
$action = $this->actionName . $this->rule->getConfig('action_suffix');
if (is_callable([$instance, $action])) {
// 执行操作方法
$call = [$instance, $action];
action | change |
id | 515 |
REDIRECT_STATUS | 200 |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_HOST | www.gtycn.net |
PATH | /sbin:/usr/sbin:/bin:/usr/bin |
LD_LIBRARY_PATH | /alidata/server/httpd/lib |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.gtycn.net |
SERVER_ADDR | 59.110.52.60 |
SERVER_PORT | 80 |
REMOTE_ADDR | 44.192.247.144 |
DOCUMENT_ROOT | /alidata/www/gty/public/ |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /alidata/www/gty/public/ |
SERVER_ADMIN | webmaster@dummy-host.example.com |
SCRIPT_FILENAME | /alidata/www/gty/public/index.php |
REMOTE_PORT | 37642 |
REDIRECT_QUERY_STRING | action=change&id=515 |
REDIRECT_URL | /admin/xueshujie_AddEdit_purview_add_change.asp |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | action=change&id=515 |
REQUEST_URI | /admin/xueshujie_AddEdit_purview_add_change.asp?action=change&id=515 |
SCRIPT_NAME | /index.php |
PATH_INFO | /admin/xueshujie_AddEdit_purview_add_change.asp |
PATH_TRANSLATED | redirect:/index.php/admin/xueshujie_AddEdit_purview_add_change.asp/xueshujie_AddEdit_purview_add_change.asp |
PHP_SELF | /index.php/admin/xueshujie_AddEdit_purview_add_change.asp |
REQUEST_TIME_FLOAT | 1711714429.234 |
REQUEST_TIME | 1711714429 |
APP_PATH | /alidata/www/gty/public/../app/ |