forked from we6288815/toolbox
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy paththink
More file actions
35 lines (29 loc) · 1.25 KB
/
think
File metadata and controls
35 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env php
<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: yunwuxin <448901948@qqlogin.com>
// +----------------------------------------------------------------------
namespace think;
// PHP 8.1 兼容性设置 - 忽略弃用警告
error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);
// 设置自定义错误处理器来处理 strpos 弃用警告
set_error_handler(function($errno, $errstr, $errfile, $errline) {
// 忽略 strpos 弃用警告
if ($errno === E_DEPRECATED && strpos($errstr, 'strpos()') !== false) {
return true;
}
// 对于其他错误,使用默认处理
return false;
}, E_DEPRECATED);
// 加载基础文件
require __DIR__ . '/thinkphp/base.php';
// 应用初始化
Container::get('app')->path(__DIR__ . '/application/')->initialize();
// 控制台初始化
Console::init();