header("HTTP/1.1 301 Moved Permanently"); header("Location: /"); $cdnurl = function_exists('config') ? config('view_replace_str.__CDN__') : ''; $publicurl = function_exists('config') ? (config('view_replace_str.__PUBLIC__')?:'/') : '/'; $debug = function_exists('config') ? config('app_debug') : false; $lang = [ 'An error occurred' => '发生错误', 'Home' => '返回主页', 'Previous Page' => '返回上一页', 'The page you are looking for is temporarily unavailable' => '你所浏览的页面暂时无法访问', 'You can return to the previous page and try again' => '你可以返回上一页重试' ]; $langSet = ''; if (isset($_GET['lang'])) { $langSet = strtolower($_GET['lang']); } elseif (isset($_COOKIE['think_var'])) { $langSet = strtolower($_COOKIE['think_var']); } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { preg_match('/^([a-z\d\-]+)/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches); $langSet = strtolower($matches[1]); } $langSet = $langSet && in_array($langSet, ['zh-cn', 'en']) ? $langSet : 'zh-cn'; $langSet == 'en' && $lang = array_combine(array_keys($lang), array_keys($lang)); ?> <br /> <b>Fatal error</b>: Uncaught think\exception\ErrorException: Undefined variable: lang in /home/wwwroot/wx1986.com/application/common/view/tpl/think_exception.tpl:36 Stack trace: #0 /home/wwwroot/wx1986.com/application/common/view/tpl/think_exception.tpl(36): think\Error::appError() #1 /home/wwwroot/wx1986.com/thinkphp/library/think/exception/Handle.php(178): include('/home/wwwroot/w...') #2 /home/wwwroot/wx1986.com/thinkphp/library/think/exception/Handle.php(96): think\exception\Handle->convertExceptionToResponse() #3 /home/wwwroot/wx1986.com/thinkphp/library/think/Error.php(52): think\exception\Handle->render() #4 /home/wwwroot/wx1986.com/thinkphp/library/think/Error.php(88): think\Error::appException() #5 [internal function]: think\Error::appShutdown() #6 {main} thrown in <b>/home/wwwroot/wx1986.com/application/common/view/tpl/think_exception.tpl</b> on line <b>36</b><br />