MyQEE\Server\WorkerManager::admin PHP Method

admin() protected method

执行后台页面
protected admin ( $uri )
$uri
    protected function admin($uri)
    {
        if ($uri === '') {
            $uri = 'index';
        } else {
            $uri = str_replace(['\\', '../'], ['/', '/'], $uri);
        }
        $file = __DIR__ . '/../../../../admin/' . $uri . (substr($uri, -1) === '/' ? 'index' : '') . '.php';
        $this->debug("request admin page: {$file}");
        if (!is_file($file)) {
            $this->response->status(404);
            $this->response->end('page not found');
            return;
        }
        ob_start();
        include $file;
        $html = ob_get_clean();
        $this->response->end($html);
    }