diff --git a/app/tpl/think_exception.tpl b/app/tpl/think_exception.tpl
new file mode 100644
index 000000000..519cc19ce
--- /dev/null
+++ b/app/tpl/think_exception.tpl
@@ -0,0 +1,535 @@
+'.end($names).'';
+ }
+}
+
+if (!function_exists('parse_file')) {
+ function parse_file($file, $line)
+ {
+ return ''.basename($file)." line {$line}".'';
+ }
+}
+
+if (!function_exists('parse_args')) {
+ function parse_args($args)
+ {
+ $result = [];
+ foreach ($args as $key => $item) {
+ switch (true) {
+ case is_object($item):
+ $value = sprintf('object(%s)', parse_class(get_class($item)));
+ break;
+ case is_array($item):
+ if (count($item) > 3) {
+ $value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3)));
+ } else {
+ $value = sprintf('[%s]', parse_args($item));
+ }
+ break;
+ case is_string($item):
+ if (strlen($item) > 20) {
+ $value = sprintf(
+ '\'%s...\'',
+ htmlentities($item),
+ htmlentities(substr($item, 0, 20))
+ );
+ } else {
+ $value = sprintf("'%s'", htmlentities($item));
+ }
+ break;
+ case is_int($item):
+ case is_float($item):
+ $value = $item;
+ break;
+ case is_null($item):
+ $value = 'null';
+ break;
+ case is_bool($item):
+ $value = '' . ($item ? 'true' : 'false') . '';
+ break;
+ case is_resource($item):
+ $value = 'resource';
+ break;
+ default:
+ $value = htmlentities(str_replace("\n", '', var_export(strval($item), true)));
+ break;
+ }
+
+ $result[] = is_int($key) ? $value : "'{$key}' => {$value}";
+ }
+
+ return implode(', ', $result);
+ }
+}
+if (!function_exists('echo_value')) {
+ function echo_value($val)
+ {
+ if (is_array($val) || is_object($val)) {
+ echo htmlentities(json_encode($val, JSON_PRETTY_PRINT));
+ } elseif (is_bool($val)) {
+ echo $val ? 'true' : 'false';
+ } elseif (is_scalar($val)) {
+ echo htmlentities($val);
+ } else {
+ echo 'Resource';
+ }
+ }
+}
+?>
+
+
+
+
+ 系统发生错误
+
+
+
+
+
+ $trace) { ?>
+
+
+
+
+
+
+
Call Stack
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Exception Datas
+ $value) { ?>
+
+
+ empty
+
+
+
+ $val) { ?>
+
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
Environment Variables
+ $value) { ?>
+
+
+ empty
+
+
+
+ $val) { ?>
+
+ |
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ thinkphp v
+ shopxo
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/app.php b/config/app.php
index d4c08edc5..80d5cc7b4 100644
--- a/config/app.php
+++ b/config/app.php
@@ -32,7 +32,7 @@ return [
'deny_app_list' => [],
// 异常页面的模板文件
- 'exception_tmpl' => ROOT . 'tpl/think_exception.tpl',
+ 'exception_tmpl' => APP_PATH . 'tpl/think_exception.tpl',
// 错误显示信息,非调试模式有效
'error_message' => '系统出现错误、请联系管理员或到'.implode('', ['S','h','o','p','X','O']).'社区查阅~',