$this->app['hook']->listen('module_init');
try {
// 实例化控制器
$instance = $this->app->controller($this->controller,
$this->rule->getConfig('url_controller_layer'),
$this->rule->getConfig('controller_suffix'),
$this->rule->getConfig('empty_controller'));
} 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];
id | 112 |
USER | www |
HOME | /home/www |
PATH_TRANSLATED | redirect:/index.php/news_main.html |
PATH_INFO | /index/news_main.html |
SCRIPT_NAME | /index.php |
REQUEST_URI | /index.php/index/news_main.html?id=112 |
QUERY_STRING | id=112 |
REQUEST_METHOD | GET |
SERVER_PROTOCOL | HTTP/1.1 |
GATEWAY_INTERFACE | CGI/1.1 |
REMOTE_PORT | 53672 |
SCRIPT_FILENAME | /www/wwwroot/www.public-tech.com/public/index.php |
SERVER_ADMIN | webmaster@example.com |
CONTEXT_DOCUMENT_ROOT | /www/wwwroot/www.public-tech.com/public |
CONTEXT_PREFIX | |
REQUEST_SCHEME | http |
DOCUMENT_ROOT | /www/wwwroot/www.public-tech.com/public |
REMOTE_ADDR | 54.144.219.156 |
SERVER_PORT | 80 |
SERVER_ADDR | 172.17.251.231 |
SERVER_NAME | public-tech.com |
SERVER_SOFTWARE | Apache |
SERVER_SIGNATURE | <address>Apache Server at public-tech.com Port 80</address> |
LD_LIBRARY_PATH | /www/server/apache/lib |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
HTTP_HOST | public-tech.com |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
proxy-nokeepalive | 1 |
SCRIPT_URI | http://public-tech.com/index.php/index/news_main.html |
SCRIPT_URL | /index.php/index/news_main.html |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php/index/news_main.html |
REQUEST_TIME_FLOAT | 1711718988.2661 |
REQUEST_TIME | 1711718988 |
APP_PATH | /www/wwwroot/www.public-tech.com/public/../project/ |