-
Notifications
You must be signed in to change notification settings - Fork 11
/
app.ini
98 lines (83 loc) · 3.32 KB
/
app.ini
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
[common];公用配置
application.directory = APP_PATH "/app/"
application.library = APP_PATH"/library"
application.modules = "Index,Printer";模块
application.dispatcher.defaultController = "Api";默认控制器名称
;配置路径
secret_config_path = APP_PATH "/conf/secret.common.ini"
tempdir = APP_PATH "/temp/";临时文件目录和日志,缓存存于此处
;路由
;printer缺省路由
routes.default.type = "rewrite"
routes.default.match = "/printer/:_c"
routes.default.route.module = "Printer"
routes.default.route.controller = :_c
routes.default.route.action = "index"
;printer完整路由
routes.prifull.type = "rewrite"
routes.prifull.match = "/printer/:_c/:_a"
routes.prifull.route.module = "Printer"
routes.prifull.route.controller = :_c
routes.prifull.route.action = :_a
;正则验证
regex.number.all = "/^(\d{6,7}|\d{10,12})$/"; //学号正则
regex.number.nku = "/^((1[1-6]\d{5})|([1|2]1201[1-6]\d{4}))$/";南开7或10
regex.number.tju = "/^[1-4]01[1-6]\d{6}$/";天大10
regex.number.tifert = "/^((0[1-5][01][0-9])|(1[139][05][1-4]))1[2-5]\d{4}$/"; 天商职10
regex.number.hebut = "/^(([1][1-5]\d{4})|(201[0-5]\d{8}))$/";河工大6或12
regex.number.gzpyp = "/^1[3-6][0,1]\d{3}0\d{3}$/";广州番职院11
regex.number.hnist = "/^((1[2,4,5])|(24))1[2-6][0-6]\d{6}$/";湖南理工学院11
regex.account = "/^\w{3,16}$/";打印店账号正则
regex.token = "/^\w{38,48}$/"
regex.phone = "/^1[34578]\d{9}$/";//手机号
regex.email = "/^[\w\.\-]{1,17}@[A-Za-z,0-9,\-,\.]{1,30}\.[A-Za-z]{2,6}$/"
regex.name = "/^[\x{4E00}-\x{9FA5}]{2,5}(·[\x{4E00}-\x{9FA5}]{2,8})?$/u";姓名支持少数民族
regex.zh = "/^[\x{4E00}-\x{9FA5}]*$/u"
;上传通用配置
upload.type = "qiniu"
upload.max = 52428800; //50 * 1024 * 1024,文件大小限制
upload.exts = "pdf,doc,docx,odt,rtf,wps,ppt,pptx,odp,dps,xls,xlsx,ods,csv,et,jpg,png,jpeg";后缀名限制
;cookie配置
cookie.path = "/"
cookie.expire = 259200 ;3天
cookie.domain = ".yunyin.org"
cookie.secure = 0
cookie.httponly = 1;
;尝试限制
try.times = 5
try.expire = 18000
;cors 跨域设置
cors.Access-Control-Allow-Credentials = "true"
cors.Access-Control-Allow-Headers = "Token,Session-ID"
cors.Access-Control-Allow-Methods = "GET,POST,PUT,DELETE"
cors.Access-Control-Max-Age = 3628800
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[dev:common];开发调试配置
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
application.bootstrap = APP_PATH "/app/Debug.php"
application.system.cache_config = 0
;特殊配置path
secret_config_path = APP_PATH "/conf/secret.local"
;开启调试
isdebug = 1
debug.auth = ""
;缓存日志相关
cache.type = "file"
kv.type = "file"
log.type = "file"
log.allow = "ERROR,WARN,DEBUG,INFO,SQL,TRACER"
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[product:common];线上配置
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
application.dispatcher.throwException = 1
application.dispatcher.catchException = 1
application.system.cache_config = 1
;特殊配置path
secret_config_path = APP_PATH "/conf/secret.product.ini"
;调试和日志相关
isdebug = 0
debug.auth = "yunyindebug";
log.allow = "ERROR,WARN"
log.type = "file";sae设置成SAE,使用系统og
cache.type = "file";缓存类型SAE设置SAE使用memcache
kv.type = "file";SAE设置为sae使用KVDB