$name = substr($name, 0, 2) . DS . substr($name, 2);
}
if ($this->options['prefix']) {
$name = $this->options['prefix'] . DS . $name;
}
$filename = $this->options['path'] . $name . '.php';
$dir = dirname($filename);
if ($auto && !is_dir($dir)) {
mkdir($dir, 0755, true);
}
return $filename;
}
/**
* 判断缓存是否存在
* @access public
* @param string $name 缓存变量名
* @return bool
string(37245) "System Error
else
include Config::get('error_tmpl');
// 获取并清空缓存
$content = ob_get_clean();
echo '<pre>';
var_dump($content);
$response = new Response($content, 'html');
// 将错误保存,访问方式 http://www.xxx.com/error.html
file_put_contents('error.html',$content);
if ($exception instanceof HttpException) {
$statusCode = $exception->getStatusCode();
$response->header($exception->getHeaders());
}
if (!isset($statusCode)) {
$statusCode = 500;
}
$response->code($statusCode);
Call Stack
"Environment Variables
GET Data
id101price152-190brand_id33POST DataemptyFilesemptyCookiesemptySessionemptyServer/Request Data
USERwwwHOME/home/wwwFCGI_ROLERESPONDERSCRIPT_FILENAME/www/wwwroot/sun.tpsns.com/index.phpQUERY_STRINGs=/home/Goods/goodsList/id/101/price/152-190/brand_id/33REQUEST_METHODGETCONTENT_TYPECONTENT_LENGTHSCRIPT_NAME/index.phpREQUEST_URI/home/Goods/goodsList/id/101/price/152-190/brand_id/33DOCUMENT_URI/index.phpDOCUMENT_ROOT/www/wwwroot/sun.tpsns.comSERVER_PROTOCOLHTTP/2.0REQUEST_SCHEMEhttpsHTTPSonGATEWAY_INTERFACECGI/1.1SERVER_SOFTWAREnginx/1.24.0REMOTE_ADDR3.15.168.130REMOTE_PORT15079SERVER_ADDR172.28.239.141SERVER_PORT443SERVER_NAMEsun.tpsns.comREDIRECT_STATUS200PATH_INFO/home/Goods/goodsList/id/101/price/152-190/brand_id/33HTTP_HOSTsun.tpsns.comHTTP_ACCEPT*/*HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)HTTP_ACCEPT_ENCODINGgzip, br, zstd, deflatePHP_SELF/index.phpREQUEST_TIME_FLOAT1746697520.849REQUEST_TIME1746697520Environment VariablesemptyThinkPHP Constants
IS_SAAS0SAAS_BASE_USER0PLUGIN_PATH/www/wwwroot/sun.tpsns.com/plugins/UPLOAD_PATHpublic/upload/TPSHOP_CACHE_TIME31104000SITE_URLhttps://sun.tpsns.comHTTPhttpsINSTALL_DATE1463741583SERIALNUMBER20160520065303oCWIoaAPP_PATH/www/wwwroot/sun.tpsns.com/application/NOW_TIME1746697520THINK_VERSION5.0.15THINK_START_TIME1746697520.8502THINK_START_MEM321768EXT.phpDS/THINK_PATH/www/wwwroot/sun.tpsns.com/thinkphp/LIB_PATH/www/wwwroot/sun.tpsns.com/thinkphp/library/CORE_PATH/www/wwwroot/sun.tpsns.com/thinkphp/library/think/TRAIT_PATH/www/wwwroot/sun.tpsns.com/thinkphp/library/traits/ROOT_PATH/www/wwwroot/sun.tpsns.com/EXTEND_PATH/www/wwwroot/sun.tpsns.com/extend/VENDOR_PATH/www/wwwroot/sun.tpsns.com/vendor/RUNTIME_PATH/www/wwwroot/sun.tpsns.com/runtime/LOG_PATH/www/wwwroot/sun.tpsns.com/runtime/log/CACHE_PATH/www/wwwroot/sun.tpsns.com/runtime/cache/TEMP_PATH/www/wwwroot/sun.tpsns.com/runtime/temp/CONF_PATH/www/wwwroot/sun.tpsns.com/application/CONF_EXT.phpENV_PREFIXPHP_IS_CLIfalseIS_WINfalseIS_AJAXfalseIS_GETtrueIS_POSTfalseMODULE_NAMEhomeCONTROLLER_NAMEGoodsACTION_NAMEgoodsListPREFIXtp_SESSION_ID
Fatal error: Uncaught exception 'think\exception\ErrorException' with message 'file_put_contents(error.html): failed to open stream: Permission denied' in /www/wwwroot/sun.tpsns.com/thinkphp/library/think/exception/Handle.php:190 Stack trace: #0 [internal function]: think\Error::appError(2, 'file_put_conten...', '/www/wwwroot/su...', 190, Array) #1 /www/wwwroot/sun.tpsns.com/thinkphp/library/think/exception/Handle.php(190): file_put_contents('error.html', '<!DOCTYPE html>...') #2 /www/wwwroot/sun.tpsns.com/thinkphp/library/think/exception/Handle.php(96): think\exception\Handle->convertExceptionToResponse(Object(think\exception\ErrorException)) #3 /www/wwwroot/sun.tpsns.com/thinkphp/library/think/Error.php(53): think\exception\Handle->render(Object(think\exception\ErrorException)) #4 /www/wwwroot/sun.tpsns.com/thinkphp/library/think/Error.php(90): think\Error::appException(Object(think\exception\ErrorException)) #5 [internal function]: think\Error::appShutdown() #6 {main} thrown in /www/wwwroot/sun.tpsns.com/thinkphp/library/think/exception/Handle.php on line 190