-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
99 lines (90 loc) · 2.68 KB
/
index.php
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* tinyPHP
*
* An open source application development framework for PHP5
*
* @package tinyPHP
* @author izyn
* @email [email protected]
* @copyright Copyright (c) 2014, izyn, Inc.
* @link https://github.com/izyn/disc
* @since Version 0.0.1
* @createdtime 2014-06-18 12:04:32
*/
/*
*-----------------------------------------------------------
* 配置
*-----------------------------------------------------------
*
* @param array $_config
* 项目配置参数
*
*/
$_config = array();
/*-- 应用目录 --*/
$_config['app_path'] = './application';
$_config['uri_model'] = 2;
/*
*-----------------------------------------------------------
* 详细配置示例
*-----------------------------------------------------------
*
* 系统错误提示级别:0 -不提示,1 -提示重要错误,2 -提示所有警告,default: 1
*
* $_config['debug'] = 1;
*
*-----------------------------------------------------------
* uri模式:
* -- 1. 目录模式(example: xxx.com/controller/action)
* -- 2. query模式(example: xxx.com?c=controller&m=action)
* -- default: 1
*-----------------------------------------------------------
*
* $_config['uri_model'] = 1;
*
*-----------------------------------------------------------
* 路由配置:
* -- controller_identifier 控制器标志,defaul: c
* -- action_identifier 方法标志,defaul: m
* -- controller_default 默认控制器,defaul: index
* -- action_default 默认控制器-方法,defaul: index
*-----------------------------------------------------------
*
* $_config['router']['controller_identifier'] = "c";
* $_config['router']['action_identifier'] = "m";
* $_config['router']['controller_default'] = "index";
* $_config['router']['action_default'] = "index";
*
*-----------------------------------------------------------
* 数据库配置:
* -- host 服务器
* -- user 用户名
* -- password 密码
* -- dbname 数据库名
* -- charset 字符集
* -- tablepre 表前缀
*-----------------------------------------------------------
*
* $_config['db']['host'] = 'localhost';
* $_config['db']['user'] = 'root';
* $_config['db']['password'] = '';
* $_config['db']['charset'] = 'utf8';
* $_config['db']['dbname'] = 'test';
* $_config['db']['tablepre'] = 'tiny_'; 表前缀
*
*/
/*
*-----------------------------------------------------------
* 导入框架核心文件
*-----------------------------------------------------------
*
*
*/
$_config['db']['host'] = 'localhost';
$_config['db']['user'] = 'root';
$_config['db']['password'] = '';
$_config['db']['charset'] = 'utf8';
$_config['db']['dbname'] = 'test';
include './tinyPHP.class.php';
tinyPHP::creatapp()->run();