Skip to content

Commit 1b8a0c3

Browse files
author
hooray
committed
更新composer支持
1 parent 044f765 commit 1b8a0c3

Some content is hidden

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

63 files changed

+2169
-1003
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
static/css/*.css.map
2-
uploads/member
2+
uploads/member
3+
libs/vendor

composer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"config": {
3+
"vendor-dir": "libs/vendor"
4+
},
5+
"require": {
6+
"catfan/Medoo": "~1.4"
7+
},
8+
"autoload": {
9+
"files": [
10+
"libs/system/functions.php",
11+
"libs/system/functions.private.php"
12+
],
13+
"classmap": [
14+
"libs/system/Uploader.class.php"
15+
]
16+
}
17+
}

composer.lock

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

global.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
<?php
22
define('ROOT', dirname(__FILE__));
33
chdir(ROOT);
4-
//数据库操作类
5-
require('inc/Medoo.php');
6-
//函数库
7-
require('inc/functions.php');
8-
require('inc/functions.private.php');
4+
require('libs/vendor/autoload.php');
95
//配置文件
106
require('inc/config.php');
117
?>

inc/config.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272
);
7373

7474
//创建数据库连接
75-
use Medoo\Medoo;
76-
$db = new Medoo(array(
75+
$db = new Medoo\Medoo(array(
7776
'database_type' => 'mysql',
7877
'database_name' => 'hoorayos',
7978
'server' => 'localhost',

0 commit comments

Comments
 (0)