Skip to content

Commit c5f378f

Browse files
committed
升级tp框架版本至5.0.8
1 parent 0062d98 commit c5f378f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+670
-561
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.idea
2+
composer.lock
3+
*.log

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
120120

121121
本项目包含的第三方源码和二进制文件之版权信息另行标注。
122122

123-
版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn)
123+
版权所有Copyright © 2006-2017 by ThinkPHP (http://thinkphp.cn)
124124

125125
All rights reserved。
126126

application/config.php

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@
114114
'request_cache' => false,
115115
// 请求缓存有效期
116116
'request_cache_expire' => null,
117+
// 全局请求缓存排除规则
118+
'request_cache_except' => [],
117119

118120
// +----------------------------------------------------------------------
119121
// | 模板设置
@@ -236,24 +238,4 @@
236238
'var_page' => 'page',
237239
'list_rows' => 15,
238240
],
239-
240-
// 以下是自定义的配置:
241-
// 模板输出替换
242-
'view_replace_str' => [
243-
'__PUBLIC__'=>'/',
244-
'__ROOT__' => '/',
245-
],
246-
247-
// 验证码配置
248-
'captcha' => [
249-
// 使用中文验证码
250-
// 'useZh' =>true,
251-
// 字体大小
252-
'fontSize' => 20,
253-
// 验证码长度(位数)
254-
'length' => 4,
255-
// 'imageW' =>80,
256-
'useNoise' =>false,
257-
// 'useCurve' =>false,
258-
]
259241
];

application/database.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
// +----------------------------------------------------------------------
99
// | Author: liu21st <liu21st@gmail.com>
1010
// +----------------------------------------------------------------------
11+
1112
return [
1213
// 数据库类型
1314
'type' => 'mysql',
1415
// 服务器地址
1516
'hostname' => '127.0.0.1',
1617
// 数据库名
17-
'database' => 'ss-vue-tp',
18+
'database' => 'vue_tp',
1819
// 用户名
1920
'username' => 'root',
2021
// 密码
Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
<?php
22
namespace app\index\controller;
3-
use think\Controller;
4-
/**
5-
*
6-
*/
7-
class Index extends Controller
3+
use think\Db;
4+
class Index
85
{
9-
10-
public function index(){
6+
public function index()
7+
{
118
return 'Server Running.<br>'.date('Y-m-d H:i:s',time()).'<br>'.'version '.THINK_VERSION;
129
}
10+
11+
public function hello($name = 'ThinkPHP5')
12+
{
13+
return 'hello,' . $name;
14+
}
15+
16+
public function test(){
17+
$data =db('user')->where('id',1)->select();
18+
dump($data);
19+
}
1320
}

application/system/view/index/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
77
<title>ss管理系统</title>
8-
<link href="__ROOT__static/layui/src/css/layui.css" rel="stylesheet">
9-
<link href="__ROOT__static/layui/global.css" rel="stylesheet">
8+
<link href="__STATIC__/layui/src/css/layui.css" rel="stylesheet">
9+
<link href="__STATIC__/layui/global.css" rel="stylesheet">
1010

1111
</head>
1212

application/system/view/login/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66
<title>用户管理系统-登录界面</title>
7-
<link href="__PUBLIC__static/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
8-
<!-- <script src="__PUBLIC__static/js/jquery-1.12.4.min.js" type="text/javascript"></script> -->
7+
<link href="__STATIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
8+
<!-- <script src="__STATIC__/js/jquery-1.12.4.min.js" type="text/javascript"></script> -->
99
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
10-
<script src="__PUBLIC__static/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
10+
<script src="__STATIC__/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
1111
<style>
1212
#verify{cursor: pointer;}
1313
</style>

application/system/view/maindata/index.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66
<title>客户数据</title>
7-
<link rel="stylesheet" href="__PUBLIC__static/bootstrap/css/bootstrap.full.css">
8-
<link rel="stylesheet" href="__PUBLIC__static/bootstrap/css/bootstrap-datepicker.min.css">
9-
<link href="__PUBLIC__static/easyui/css/easyui.css" rel="stylesheet" type="text/css" />
10-
<link href="__PUBLIC__static/easyui/css/icon.css" rel="stylesheet" type="text/css" />
11-
<script src="__PUBLIC__static/easyui/js/jquery.min.js" type="text/javascript"></script>
12-
<script src="__PUBLIC__static/easyui/js/jquery.easyui.min.js" type="text/javascript"></script>
13-
<script src="__PUBLIC__static/easyui/js/easyui-lang-zh_CN.js" type="text/javascript"></script>
14-
<script src="__PUBLIC__static/easyui/js/datagrid-detailview.js"></script>
15-
16-
17-
<script src="__PUBLIC__static/bootstrap/js/bootstrap.min.js"></script>
18-
<script src="__PUBLIC__static/bootstrap/js/bootstrap-datepicker.min.js"></script>
19-
<script src="__PUBLIC__static/bootstrap/js/bootstrap-datepicker.zh-CN.min.js"></script>
7+
<link rel="stylesheet" href="__STATIC__/bootstrap/css/bootstrap.full.css">
8+
<link rel="stylesheet" href="__STATIC__/bootstrap/css/bootstrap-datepicker.min.css">
9+
<link href="__STATIC__/easyui/css/easyui.css" rel="stylesheet" type="text/css" />
10+
<link href="__STATIC__/easyui/css/icon.css" rel="stylesheet" type="text/css" />
11+
<script src="__STATIC__/easyui/js/jquery.min.js" type="text/javascript"></script>
12+
<script src="__STATIC__/easyui/js/jquery.easyui.min.js" type="text/javascript"></script>
13+
<script src="__STATIC__/easyui/js/easyui-lang-zh_CN.js" type="text/javascript"></script>
14+
<script src="__STATIC__/easyui/js/datagrid-detailview.js"></script>
15+
16+
17+
<script src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
18+
<script src="__STATIC__/bootstrap/js/bootstrap-datepicker.min.js"></script>
19+
<script src="__STATIC__/bootstrap/js/bootstrap-datepicker.zh-CN.min.js"></script>
2020
<style>
2121
body{margin: 0;padding: 0;}
2222
/* .yes{color: green;}

application/system/view/public/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
</div>
66

77

8-
<script src="__ROOT__static/layui/src/layui.js"></script>
8+
<script src="__STATIC__/layui/src/layui.js"></script>
99

1010
<!-- 规范化的用法(推荐) -->
1111
<script>
1212
layui.config({
13-
base: '__ROOT__static/layui/' //你的模块目录
13+
base: '__STATIC__/layui/' //你的模块目录
1414
}).use('global'); //加载入口
1515
</script>

application/system/view/user/add.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66
<title>添加账号</title>
7-
<link href="__ROOT__static/layui/src/css/layui.css" rel="stylesheet">
8-
<link href="__ROOT__static/layui/global.css" rel="stylesheet">
7+
<link href="__STATIC__/layui/src/css/layui.css" rel="stylesheet">
8+
<link href="__STATIC__/layui/global.css" rel="stylesheet">
99
</head>
1010

1111
<body>
@@ -83,7 +83,7 @@
8383
{include file="public/footer" /}
8484
</div>
8585
<!-- <script src="http://apps.bdimg.com/libs/jquery/1.8.3/jquery.min.js"></script> -->
86-
<script src="__ROOT__static/js/ajax.min.js"></script>
86+
<script src="__STATIC__/js/ajax.min.js"></script>
8787
<script>
8888
layui.use('laydate', function(){
8989
});

application/system/view/user/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
66
<title>账号列表</title>
7-
<link href="__ROOT__static/layui/src/css/layui.css" rel="stylesheet">
8-
<link href="__ROOT__static/layui/global.css" rel="stylesheet">
7+
<link href="__STATIC__/layui/src/css/layui.css" rel="stylesheet">
8+
<link href="__STATIC__/layui/global.css" rel="stylesheet">
99
</head>
1010

1111
<body>

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=5.4.0",
20-
"topthink/framework": "^5.0",
21-
"topthink/think-captcha": "^1.0"
20+
"topthink/framework": "^5.0"
2221
},
2322
"extra": {
2423
"think-path": "thinkphp"

composer.lock

Lines changed: 0 additions & 148 deletions
This file was deleted.

thinkphp/base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// | Author: liu21st <liu21st@gmail.com>
1010
// +----------------------------------------------------------------------
1111

12-
define('THINK_VERSION', '5.0.7');
12+
define('THINK_VERSION', '5.0.8');
1313
define('THINK_START_TIME', microtime(true));
1414
define('THINK_START_MEM', memory_get_usage());
1515
define('EXT', '.php');

thinkphp/convention.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// | 应用设置
66
// +----------------------------------------------------------------------
77

8-
// 应用命名空间
9-
'app_namespace' => 'app',
108
// 应用调试模式
119
'app_debug' => true,
1210
// 应用Trace

0 commit comments

Comments
 (0)