diff --git a/mode/console.php b/mode/console.php index 194893b9..fcb3cb0d 100644 --- a/mode/console.php +++ b/mode/console.php @@ -21,9 +21,22 @@ return [ 'traits' => LIB_PATH . 'traits' . DS, APP_NAMESPACE => APP_PATH, ], - - 'config' => [ - 'commands' => [], + // 别名定义 + 'alias' => [ + 'think\Error' => MODE_PATH . 'console/Error' . EXT, ], + // 配置文件 + 'config' => [ + 'log' => [ + 'type' => 'File', // 支持 file socket trace sae + 'path' => LOG_PATH, + ], + 'cache' => [ + 'type' => 'File', + 'path' => CACHE_PATH, + 'prefix' => '', + 'expire' => 0, + ] + ] ]; diff --git a/mode/console/Error.php b/mode/console/Error.php new file mode 100644 index 00000000..6f84280c --- /dev/null +++ b/mode/console/Error.php @@ -0,0 +1,25 @@ + +// +---------------------------------------------------------------------- +namespace think; + +class Error +{ + /** + * 注册异常处理 + * @return void + */ + public static function register() + { + ini_set("display_errors","Off"); + //TODO + } + +} \ No newline at end of file