From 37b7e6500042b9197e1c4b307f23327f89698e72 Mon Sep 17 00:00:00 2001 From: IQ Date: Tue, 9 Jul 2019 17:11:27 +0800 Subject: [PATCH] tp6 --- config/app.php | 47 -------------------------- config/cache.php | 39 ---------------------- config/console.php | 21 ------------ config/cookie.php | 28 ---------------- config/database.php | 70 --------------------------------------- config/filesystem.php | 20 ----------- config/lang.php | 37 --------------------- config/log.php | 55 ------------------------------ config/route.php | 63 ----------------------------------- config/session.php | 27 --------------- config/template.php | 25 -------------- config/trace.php | 20 ----------- extend/.gitignore | 2 -- public/.htaccess | 8 ----- public/favicon.ico | Bin 1150 -> 0 bytes public/index.php | 24 -------------- public/robots.txt | 2 -- public/router.php | 17 ---------- public/static/.gitignore | 2 -- route/app.php | 17 ---------- runtime/.gitignore | 2 -- view/README.md | 1 - 22 files changed, 527 deletions(-) delete mode 100644 config/app.php delete mode 100644 config/cache.php delete mode 100644 config/console.php delete mode 100644 config/cookie.php delete mode 100644 config/database.php delete mode 100644 config/filesystem.php delete mode 100644 config/lang.php delete mode 100644 config/log.php delete mode 100644 config/route.php delete mode 100644 config/session.php delete mode 100644 config/template.php delete mode 100644 config/trace.php delete mode 100644 extend/.gitignore delete mode 100644 public/.htaccess delete mode 100644 public/favicon.ico delete mode 100644 public/index.php delete mode 100644 public/robots.txt delete mode 100644 public/router.php delete mode 100644 public/static/.gitignore delete mode 100644 route/app.php delete mode 100644 runtime/.gitignore delete mode 100644 view/README.md diff --git a/config/app.php b/config/app.php deleted file mode 100644 index 51b737c..0000000 --- a/config/app.php +++ /dev/null @@ -1,47 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | 应用设置 -// +---------------------------------------------------------------------- - -use think\facade\Env; - -return [ - // 应用地址 - 'app_host' => Env::get('app.host', ''), - // 应用的命名空间 - 'app_namespace' => '', - // 是否启用路由 - 'with_route' => true, - // 是否启用事件 - 'with_event' => true, - // 自动多应用模式 - 'auto_multi_app' => false, - // 应用映射(自动多应用模式有效) - 'app_map' => [], - // 域名绑定(自动多应用模式有效) - 'domain_bind' => [], - // 禁止URL访问的应用列表(自动多应用模式有效) - 'deny_app_list' => [], - // 默认应用 - 'default_app' => 'index', - // 默认时区 - 'default_timezone' => 'Asia/Shanghai', - - // 异常页面的模板文件 - 'exception_tmpl' => app()->getThinkPath() . 'tpl/think_exception.tpl', - - // 错误显示信息,非调试模式有效 - 'error_message' => '页面错误!请稍后再试~', - // 显示错误信息 - 'show_error_msg' => false, -]; diff --git a/config/cache.php b/config/cache.php deleted file mode 100644 index 23f82b4..0000000 --- a/config/cache.php +++ /dev/null @@ -1,39 +0,0 @@ - -// +---------------------------------------------------------------------- -use think\facade\Env; - -// +---------------------------------------------------------------------- -// | 缓存设置 -// +---------------------------------------------------------------------- - -return [ - // 默认缓存驱动 - 'default' => Env::get('cache.driver', 'file'), - - // 缓存连接方式配置 - 'stores' => [ - 'file' => [ - // 驱动方式 - 'type' => 'File', - // 缓存保存目录 - 'path' => app()->getRuntimePath() . 'cache', - // 缓存前缀 - 'prefix' => '', - // 缓存有效期 0表示永久缓存 - 'expire' => 0, - // 缓存标签前缀 - 'tag_prefix' => 'tag:', - // 序列化机制 例如 ['serialize', 'unserialize'] - 'serialize' => [], - ], - // 更多的缓存连接 - ], -]; diff --git a/config/console.php b/config/console.php deleted file mode 100644 index cf6b4ec..0000000 --- a/config/console.php +++ /dev/null @@ -1,21 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | 控制台配置 -// +---------------------------------------------------------------------- -return [ - // 执行用户(Windows下无效) - 'user' => null, - // 指令定义 - 'commands' => [ - ], -]; diff --git a/config/cookie.php b/config/cookie.php deleted file mode 100644 index bbc5819..0000000 --- a/config/cookie.php +++ /dev/null @@ -1,28 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | Cookie设置 -// +---------------------------------------------------------------------- -return [ - // cookie 保存时间 - 'expire' => 0, - // cookie 保存路径 - 'path' => '/', - // cookie 有效域名 - 'domain' => '', - // cookie 启用安全传输 - 'secure' => false, - // httponly设置 - 'httponly' => false, - // 是否使用 setcookie - 'setcookie' => true, -]; diff --git a/config/database.php b/config/database.php deleted file mode 100644 index a9a01e8..0000000 --- a/config/database.php +++ /dev/null @@ -1,70 +0,0 @@ - -// +---------------------------------------------------------------------- - -use think\facade\Env; - -return [ - // 默认使用的数据库连接配置 - 'default' => Env::get('database.driver', 'mysql'), - - // 自定义时间查询规则 - 'time_query_rule' => [], - - // 自动写入时间戳字段 - // true为自动识别类型 false关闭 - // 字符串则明确指定时间字段类型 支持 int timestamp datetime date - 'auto_timestamp' => true, - - // 时间字段取出后的默认时间格式 - 'datetime_format' => 'Y-m-d H:i:s', - - // 数据库连接配置信息 - 'connections' => [ - 'mysql' => [ - // 数据库类型 - 'type' => Env::get('database.type', 'mysql'), - // 服务器地址 - 'hostname' => Env::get('database.hostname', '127.0.0.1'), - // 数据库名 - 'database' => Env::get('database.database', ''), - // 用户名 - 'username' => Env::get('database.username', 'root'), - // 密码 - 'password' => Env::get('database.password', ''), - // 端口 - 'hostport' => Env::get('database.hostport', '3306'), - // 数据库连接参数 - 'params' => [], - // 数据库编码默认采用utf8 - 'charset' => Env::get('database.charset', 'utf8'), - // 数据库表前缀 - 'prefix' => Env::get('database.prefix', ''), - // 数据库调试模式 - 'debug' => Env::get('database.debug', true), - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) - 'deploy' => 0, - // 数据库读写是否分离 主从式有效 - 'rw_separate' => false, - // 读写分离后 主服务器数量 - 'master_num' => 1, - // 指定从服务器序号 - 'slave_no' => '', - // 是否严格检查字段是否存在 - 'fields_strict' => true, - // 是否需要进行SQL性能分析 - 'sql_explain' => false, - // 是否需要断线重连 - 'break_reconnect' => false, - ], - - // 更多的数据库配置信息 - ], -]; diff --git a/config/filesystem.php b/config/filesystem.php deleted file mode 100644 index b6a0c5c..0000000 --- a/config/filesystem.php +++ /dev/null @@ -1,20 +0,0 @@ - Env::get('filesystem.driver', 'local'), - 'disks' => [ - 'local' => [ - 'type' => 'local', - 'root' => app()->getRuntimePath() . 'storage', - ], - 'public' => [ - 'type' => 'local', - 'root' => app()->getRootPath() . 'public/storage', - 'url' => '/storage', - 'visibility' => 'public', - ], - // 更多的磁盘配置信息 - ], -]; diff --git a/config/lang.php b/config/lang.php deleted file mode 100644 index 7659eaa..0000000 --- a/config/lang.php +++ /dev/null @@ -1,37 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | 多语言设置 -// +---------------------------------------------------------------------- - -use think\facade\Env; - -return [ - // 默认语言 - 'default_lang' => Env::get('lang.default_lang', 'zh-cn'), - // 允许的语言列表 - 'allow_lang_list' => [], - // 多语言自动侦测变量名 - 'detect_var' => 'lang', - // 是否使用Cookie记录 - 'use_cookie' => true, - // 多语言cookie变量 - 'cookie_var' => 'think_lang', - // 扩展语言包 - 'extend_list' => [], - // Accept-Language转义为对应语言包名称 - 'accept_language' => [ - 'zh-hans-cn' => 'zh-cn', - ], - // 是否支持语言分组 - 'allow_group' => false, -]; diff --git a/config/log.php b/config/log.php deleted file mode 100644 index 1f8d330..0000000 --- a/config/log.php +++ /dev/null @@ -1,55 +0,0 @@ - -// +---------------------------------------------------------------------- -use think\facade\Env; - -// +---------------------------------------------------------------------- -// | 日志设置 -// +---------------------------------------------------------------------- -return [ - // 默认日志记录通道 - 'default' => Env::get('log.channel', 'file'), - // 日志记录级别 - 'level' => [], - // 日志类型记录的通道 ['error'=>'email',...] - 'type_channel' => [], - // 关闭全局日志写入 - 'close' => false, - // 全局日志处理 支持闭包 - 'processor' => null, - - // 日志通道列表 - 'channels' => [ - 'file' => [ - // 日志记录方式 - 'type' => 'File', - // 日志保存目录 - 'path' => app()->getRuntimePath() . 'log', - // 单文件日志写入 - 'single' => false, - // 独立日志级别 - 'apart_level' => [], - // 最大日志文件数量 - 'max_files' => 0, - // 使用JSON格式记录 - 'json' => false, - // 日志处理 - 'processor' => null, - // 关闭通道日志写入 - 'close' => false, - // 日志输出格式化 - 'format' => '[%s][%s] %s', - // 是否实时写入 - 'realtime_write' => false, - ], - // 其它日志通道配置 - ], - -]; diff --git a/config/route.php b/config/route.php deleted file mode 100644 index 36686a6..0000000 --- a/config/route.php +++ /dev/null @@ -1,63 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | 应用设置 -// +---------------------------------------------------------------------- - -return [ - // pathinfo分隔符 - 'pathinfo_depr' => '/', - // URL伪静态后缀 - 'url_html_suffix' => 'html', - // URL普通方式参数 用于自动生成 - 'url_common_param' => true, - // 是否开启路由延迟解析 - 'url_lazy_route' => false, - // 是否强制使用路由 - 'url_route_must' => false, - // 合并路由规则 - 'route_rule_merge' => false, - // 路由是否完全匹配 - 'route_complete_match' => false, - // 是否开启路由缓存 - 'route_check_cache' => false, - // 路由缓存连接参数 - 'route_cache_option' => [], - // 路由缓存Key - 'route_check_cache_key' => '', - // 访问控制器层名称 - 'controller_layer' => 'controller', - // 空控制器名 - 'empty_controller' => 'Error', - // 是否使用控制器后缀 - 'controller_suffix' => false, - // 默认的路由变量规则 - 'default_route_pattern' => '[\w\.]+', - // 是否自动转换URL中的控制器和操作名 - 'url_convert' => true, - // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 - 'request_cache' => false, - // 请求缓存有效期 - 'request_cache_expire' => null, - // 全局请求缓存排除规则 - 'request_cache_except' => [], - // 默认控制器名 - 'default_controller' => 'Index', - // 默认操作名 - 'default_action' => 'index', - // 操作方法后缀 - 'action_suffix' => '', - // 默认JSONP格式返回的处理方法 - 'default_jsonp_handler' => 'jsonpReturn', - // 默认JSONP处理方法 - 'var_jsonp_handler' => 'callback', -]; diff --git a/config/session.php b/config/session.php deleted file mode 100644 index 7a2527a..0000000 --- a/config/session.php +++ /dev/null @@ -1,27 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | 会话设置 -// +---------------------------------------------------------------------- - -return [ - // session name - 'name' => '', - // SESSION_ID的提交变量,解决flash上传跨域 - 'var_session_id' => '', - // 驱动方式 支持file redis memcache memcached - 'type' => 'file', - // 过期时间 - 'expire' => 0, - // 前缀 - 'prefix' => '', -]; diff --git a/config/template.php b/config/template.php deleted file mode 100644 index 98fd536..0000000 --- a/config/template.php +++ /dev/null @@ -1,25 +0,0 @@ - 'Think', - // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 - 'auto_rule' => 1, - // 模板路径 - 'view_path' => '', - // 模板后缀 - 'view_suffix' => 'html', - // 模板文件名分隔符 - 'view_depr' => DIRECTORY_SEPARATOR, - // 模板引擎普通标签开始标记 - 'tpl_begin' => '{', - // 模板引擎普通标签结束标记 - 'tpl_end' => '}', - // 标签库标签开始标记 - 'taglib_begin' => '{', - // 标签库标签结束标记 - 'taglib_end' => '}', -]; diff --git a/config/trace.php b/config/trace.php deleted file mode 100644 index e268f3a..0000000 --- a/config/trace.php +++ /dev/null @@ -1,20 +0,0 @@ - -// +---------------------------------------------------------------------- - -// +---------------------------------------------------------------------- -// | Trace设置 开启调试模式后有效 -// +---------------------------------------------------------------------- -return [ - // 内置Html 支持扩展 - 'type' => 'Html', - // 读取的日志通道名 - 'channel' => '', -]; diff --git a/extend/.gitignore b/extend/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/extend/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess deleted file mode 100644 index cbc7868..0000000 --- a/public/.htaccess +++ /dev/null @@ -1,8 +0,0 @@ - - Options +FollowSymlinks -Multiviews - RewriteEngine On - - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] - diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index e71815a6618c6ef19c78d27840b8995fb2521499..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmbVMSx8i26uv?4_SAEaJq7BFqqJE;Q9TBc5JYcLIgSmPnyr-jk`K{>ZB(>aLWVXo z*9E63a&I$RrZR03EEi&&_1^#9`}O_*AViPd;mm*e&-u>z&UX%1)0XhJY?;RY723X~ znzmfiw3Reo@g{fAL(}N{_i=@Ma0M%r6$X8HFcE zpG~1@_%Y6ow1ksJIN%eE0)m_g-8Gd#K%-r;7XvI$t0gLrlUMS(*o zV$Y+$Ct(SJ+L5c+)7OmI%nVG$!vbteaep>7ij6%r*#F`@;?!a~HIJfDIkr7LrT7TO z8Pus^>>;*w*WwO!6s7@#wJgVkVE+^G7)ra2;Ldm_p8Ob6`0br_NQk8JTkP3k{J^jG z*cCa8vT!3JGaq0ucb3{&JkLiTVfXWMD5q9ZyH%ZD)V;jPIT^6ouVd%VG`X~V*0H+F zhl^v6kP#Mn+6Yg-!rHDH>fs|^>X)1U?nncMSj%CIp#G9el3d=+e!&L43iV_6ITI5d zQv>h>y$V~X^k*JwD7m;pl{iR^$K%uN!-g$vq?qse=KxBm_3+$BoO#pw7gpx+aR#|L z%6Dm{!D`%_jIeKm8ajyn9!EZFoOpW+Tl5oZR|^>D;?7A9ZiV-%JuQ#*owco@x{a zD-|ENtov7tOFzK5r}KRMSHhkEb!7aa$$nhqBKuHtV!cJ5I+?Si!w-Hm{`)ye -// +---------------------------------------------------------------------- - -// [ 应用入口文件 ] -namespace think; - -require __DIR__ . '/../vendor/autoload.php'; - -// 执行HTTP应用并响应 -$http = (new App())->http; - -$response = $http->run(); - -$response->send(); - -$http->end($response); diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index eb05362..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: diff --git a/public/router.php b/public/router.php deleted file mode 100644 index 4f916b4..0000000 --- a/public/router.php +++ /dev/null @@ -1,17 +0,0 @@ - -// +---------------------------------------------------------------------- -// $Id$ - -if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { - return false; -} else { - require __DIR__ . "/index.php"; -} diff --git a/public/static/.gitignore b/public/static/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/public/static/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/route/app.php b/route/app.php deleted file mode 100644 index d8e09e3..0000000 --- a/route/app.php +++ /dev/null @@ -1,17 +0,0 @@ - -// +---------------------------------------------------------------------- -use think\facade\Route; - -Route::get('think', function () { - return 'hello,ThinkPHP6!'; -}); - -Route::get('hello/:name', 'index/hello'); diff --git a/runtime/.gitignore b/runtime/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/runtime/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/view/README.md b/view/README.md deleted file mode 100644 index 360eb24..0000000 --- a/view/README.md +++ /dev/null @@ -1 +0,0 @@ -如果不使用模板,可以删除该目录 \ No newline at end of file