6163银河官网-Best Platform
Exception (500)
Template file '/www/wwwroot/huojuantaicom/themes/default/error_404.html' not found Exception thrown with message "Template file '/www/wwwroot/huojuantaicom/themes/default/error_404.html' not found" Stacktrace: #12 Exception in /www/wwwroot/huojuantaicom/framework/base/Template.php:112 #11 framework\base\Template:compile in /www/wwwroot/huojuantaicom/framework/base/Template.php:97 #10 framework\base\Template:display in /www/wwwroot/huojuantaicom/framework/base/Controller.php:27 #9 framework\base\Controller:display in /www/wwwroot/huojuantaicom/app/home/controller/SiteController.php:46 #8 app\home\controller\SiteController:siteDisplay in /www/wwwroot/huojuantaicom/app/home/controller/IndexController.php:26 #7 app\home\controller\IndexController:error404 in /www/wwwroot/huojuantaicom/app/base/controller/ErrorController.php:21 #6 app\base\controller\ErrorController:error in /www/wwwroot/huojuantaicom/app/base/hook/AppHook.php:60 #5 app\base\hook\AppHook:appError in /www/wwwroot/huojuantaicom/framework/base/Hook.php:50 #4 call_user_func_array in /www/wwwroot/huojuantaicom/framework/base/Hook.php:50 #3 framework\base\Hook:exec in /www/wwwroot/huojuantaicom/framework/base/Hook.php:34 #2 framework\base\Hook:listen in /www/wwwroot/huojuantaicom/framework/base/App.php:78 #1 framework\base\App:run in /www/wwwroot/huojuantaicom/framework/core.php:125 #0 require in /www/wwwroot/huojuantaicom/index.php:8
Stack frames (13)
12
Exception
/framework/base/Template.php112
11
framework\base\Template compile
/framework/base/Template.php97
10
framework\base\Template display
/framework/base/Controller.php27
9
framework\base\Controller display
/app/home/controller/SiteController.php46
8
app\home\controller\SiteController siteDisplay
/app/home/controller/IndexController.php26
7
app\home\controller\IndexController error404
/app/base/controller/ErrorController.php21
6
app\base\controller\ErrorController error
/app/base/hook/AppHook.php60
5
app\base\hook\AppHook appError
/framework/base/Hook.php50
4
call_user_func_array
/framework/base/Hook.php50
3
framework\base\Hook exec
/framework/base/Hook.php34
2
framework\base\Hook listen
/framework/base/App.php78
1
framework\base\App run
/framework/core.php125
0
require
/index.php8
/www/wwwroot/huojuantaicom/framework/base/Template.php
            ob_start();
        }
 
        extract($this->vars, EXTR_OVERWRITE);
        eval('?>'.$this->compile($tpl, $isTpl));
 
        if ($return) {
            $content = ob_get_contents();
            ob_end_clean();
 
            return $content;
        }
    }
 
    public function compile($tpl, $isTpl = true)
    {
        if ($isTpl) {
            $tplFile = $this->config['TPL_PATH'].$tpl.$this->config['TPL_SUFFIX'];
            if (!file_exists($tplFile)) {
                throw new \Exception("Template file '{$tplFile}' not found", 500);
            }
            $tplKey = md5(realpath($tplFile));
        } else {
            $tplKey = md5($tpl);
        }
 
        $ret = unserialize($this->cache->get($tplKey));
        if (empty($ret['template']) || ($isTpl && filemtime($tplFile) > ($ret['compile_time']))) {
            $template = $isTpl ? file_get_contents($tplFile) : $tpl;
            if (false === Hook::listen('templateParse', [$template], $template)) {
                foreach ($this->label as $key => $value) {
                    $template = preg_replace($key, $value, $template);
                }
            }
            $ret = ['template'=>$template, 'compile_time'=>time()];
            $this->cache->set($tplKey, serialize($ret), 86400 * 365);
        }
 
        return $ret['template'];
    }
/www/wwwroot/huojuantaicom/framework/base/Template.php
            foreach ($name as $k => $v) {
                $this->vars[$k] = $v;
            }
        } else {
            $this->vars[$name] = $value;
        }
    }
 
    public function display($tpl = '', $return = false, $isTpl = true)
    {
        if ($return) {
            if (ob_get_level()) {
                ob_end_flush();
                flush();
            }
            ob_start();
        }
 
        extract($this->vars, EXTR_OVERWRITE);
        eval('?>'.$this->compile($tpl, $isTpl));
 
        if ($return) {
            $content = ob_get_contents();
            ob_end_clean();
 
            return $content;
        }
    }
 
    public function compile($tpl, $isTpl = true)
    {
        if ($isTpl) {
            $tplFile = $this->config['TPL_PATH'].$tpl.$this->config['TPL_SUFFIX'];
            if (!file_exists($tplFile)) {
                throw new \Exception("Template file '{$tplFile}' not found", 500);
            }
            $tplKey = md5(realpath($tplFile));
        } else {
            $tplKey = md5($tpl);
        }
/www/wwwroot/huojuantaicom/framework/base/Controller.php
 
    public function assign($name, $value = null)
    {
        return $this->_getView()->assign($name, $value);
    }
 
    public function display($tpl = '', $return = false, $isTpl = true)
    {
        if ($isTpl) {
            if (empty($tpl)) {
                $tpl = 'app/'.APP_NAME.'/view/'.strtolower(CONTROLLER_NAME).config('TPL.TPL_DEPR').strtolower(ACTION_NAME);
            }
            if ($this->layout) {
                $this->__template_file = $tpl;
                $tpl = $this->layout;
            }
        }
        $this->_getView()->assign(get_object_vars($this));
 
        return $this->_getView()->display($tpl, $return, $isTpl);
    }
 
    public function isPost()
    {
        return $_SERVER['REQUEST_METHOD'] == 'POST';
    }
 
    public function redirect($url, $code = 302)
    {
        header('location:'.$url, true, $code);
        exit;
    }
 
    public function alert($msg, $url = null, $charset = 'utf-8')
    {
        header("Content-type: text/html; charset={$charset}");
        $alert_msg = "alert('$msg');";
        if (empty($url)) {
            $go_url = 'history.go(-1);';
        } else {
/www/wwwroot/huojuantaicom/app/home/controller/SiteController.php
 
    /**
     * 前台模板显示 调用内置的模板引擎.
     *
     * @param string $name 模板名
     * @param bool   $type 模板输出
     *
     * @return void
     */
    protected function siteDisplay($name = '', $type = true)
    {
        // 多语言
        if (defined('LANG_OPEN')) {
            $tpl = THEME_NAME.'/'.TPL_NAME.'/'.APP_LANG.'/'.$name;
        } else {
            $tpl = THEME_NAME.'/'.TPL_NAME.'/'.$name;
        }
 
        if ($type) {
            $this->display($tpl);
        } else {
            return $this->display($tpl, true);
        }
    }
 
    /**
     * 页面Meda信息组合.
     *
     * @return array 页面信息
     */
    protected function getMedia($title = '', $keywords = '', $description = '')
    {
        if (empty($title)) {
            $title = config('site_title').''.config('site_subtitle');
        } else {
            $title = $title.' - '.config('site_title').''.config('site_subtitle');
        }
        if (empty($keywords)) {
            $keywords = config('site_keywords');
        }
/www/wwwroot/huojuantaicom/app/home/controller/IndexController.php
 */
class IndexController extends SiteController
{
    /**
     * 主页.
     */
    public function index()
    {
        //MEDIA信息
        $media = $this->getMedia();
        $this->assign('media', $media);
        $this->siteDisplay(config('tpl_index'));
    }
 
    /**
     * 页面不存在.
     */
    public function error404()
    {
        $this->siteDisplay('error_404');
    }
}
 
/www/wwwroot/huojuantaicom/app/base/controller/ErrorController.php
 
namespace app\base\controller;
 
use framework\base\Controller;
 
class ErrorController extends Controller
{
    public function error404($e = null)
    {
        header('HTTP/1.1 404 Not Found');
        header('status: 404 Not Found');
        $this->error($e);
    }
 
    public function error($e = null)
    {
        //关闭调试或者是线上版本,不显示详细错误
        if (false == config('DEBUG') || 'production' == config('ENV')) {
            $home = new \app\home\controller\IndexController();
            $home->error404();
        } else {
            throw $e;
        }
    }
}
 
/www/wwwroot/huojuantaicom/app/base/hook/AppHook.php
                Hook::listen('CheckAdminLang');
            }
        }
 
        $this->startTime = microtime(true);
    }
 
    public function appEnd()
    {
        //echo microtime(true) - $this->startTime ;
    }
 
    public function appError($e)
    {
        if (404 == $e->getCode()) {
            $action = 'error404';
        } else {
            $action = 'error';
        }
        obj('app\base\controller\ErrorController')->$action($e);
    }
 
    public function routeParseUrl($rewriteRule, $rewriteOn)
    {
    }
 
    public function actionBefore($obj, $action)
    {
    }
 
    public function actionAfter($obj, $action)
    {
    }
}
 
/www/wwwroot/huojuantaicom/framework/base/Hook.php
            return false;
        }
        foreach (self::$tags[$tag] as $class) {
            $result = self::exec($class, $tag, $params);
            if (false === $result) {
                break;
            }
        }
 
        return true;
    }
 
    protected static function exec($class, $method, $params)
    {
        static $objArr = [];
        if (!isset($objArr[$class])) {
            $objArr[$class] = new $class();
        }
 
        return call_user_func_array([$objArr[$class], $method], (array) $params);
    }
}
 
/www/wwwroot/huojuantaicom/framework/base/Hook.php
            return false;
        }
        foreach (self::$tags[$tag] as $class) {
            $result = self::exec($class, $tag, $params);
            if (false === $result) {
                break;
            }
        }
 
        return true;
    }
 
    protected static function exec($class, $method, $params)
    {
        static $objArr = [];
        if (!isset($objArr[$class])) {
            $objArr[$class] = new $class();
        }
 
        return call_user_func_array([$objArr[$class], $method], (array) $params);
    }
}
 
/www/wwwroot/huojuantaicom/framework/base/Hook.php
                continue;
            }
 
            $class = substr($file, $pos + 1, -4);
            $class = "\\app\\base\\hook\\{$class}";
 
            $methods = get_class_methods($class);
            foreach ((array) $methods as $method) {
                self::$tags[$method][] = $class;
            }
        }
    }
 
    public static function listen($tag, $params = [], &$result = null)
    {
        if (!isset(self::$tags[$tag])) {
            return false;
        }
        foreach (self::$tags[$tag] as $class) {
            $result = self::exec($class, $tag, $params);
            if (false === $result) {
                break;
            }
        }
 
        return true;
    }
 
    protected static function exec($class, $method, $params)
    {
        static $objArr = [];
        if (!isset($objArr[$class])) {
            $objArr[$class] = new $class();
        }
 
        return call_user_func_array([$objArr[$class], $method], (array) $params);
    }
}
 
/www/wwwroot/huojuantaicom/framework/base/App.php
            if (!class_exists($controller)) {
                throw new \Exception("Controller '{$controller}' not found", 404);
            }
            $obj = new $controller();
            if (!method_exists($obj, $action)) {
                throw new \Exception("Action '{$controller}::{$action}()' not found", 404);
            }
 
            Hook::listen('actionBefore', [$obj, $action]);
            $obj->$action();
            Hook::listen('actionAfter', [$obj, $action]);
        } catch (\Exception $e) {
            // //关闭调试或者是线上版本,不显示详细错误
            // if (false==config('DEBUG') || 'production' == config('ENV')) {
            //     $home = new \app\home\controller\IndexController();
            //     $home->error404();
            // } else {
            //     throw $e;
            // }
            Hook::listen('appError', [$e]);
        }
 
        Hook::listen('appEnd');
    }
}
 
/www/wwwroot/huojuantaicom/framework/core.php
                foreach (glob($fileDIR.'*.php') as $file) {
                    $fileList[$fileDIR][] = $file;
                }
            }
 
            $fileBase = $baseDir.str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR.$className;
            foreach ($fileList[$fileDIR] as $file) {
                if (false !== stripos($file, $fileBase)) {
                    require $file;
 
                    return true;
                }
            }
        }
    }
 
    return false;
});
 
App::run();
 
/www/wwwroot/huojuantaicom/index.php


                  
                
                

Environment & details:

empty
empty
empty
Key Value
PHPSESSID k2feedrgsv9ue6jdjthjanl8r2
empty
Key Value
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /www/wwwroot/huojuantaicom/index.php
QUERY_STRING
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /message/
DOCUMENT_URI /index.php
DOCUMENT_ROOT /www/wwwroot/huojuantaicom
SERVER_PROTOCOL HTTP/1.1
REQUEST_SCHEME http
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.20.1
REMOTE_ADDR 107.158.144.194
REMOTE_PORT 55814
SERVER_ADDR 172.31.76.118
SERVER_PORT 80
SERVER_NAME www.huojuantai.com
REDIRECT_STATUS 200
PATH_INFO
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_HOST www.huojuantai.com
HTTP_ACCEPT */*
HTTP_ACCEPT_ENCODING gzip
HTTP_COOKIE PHPSESSID=k2feedrgsv9ue6jdjthjanl8r2
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1695863800.9814
REQUEST_TIME 1695863800
empty
0. Whoops\Handler\PrettyPageHandler