-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.php
98 lines (87 loc) · 3.18 KB
/
config.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
<?php
defined('IN_APP') or die('Access Denied.');
define('APP_NAME','/m/');
///需要设置是否为2级目录, 头像 和上传flash 需要调用那2个地址
/*系统公用配置文件位置*
/*安装日期 2012年 10月 04日 16:00*/
$spConfig = array(
'yb' =>array(
'loginCodeSwitch'=>'close',//登陆验证开关 打开请写open
'regCodeSwitch'=>'close', //注册验证开关 打开请写open
),
'mode' => 'debug', //系统启动模式 debug 调试模式 release 部署模式
'dispatcher_error' => "err404();", // 定义处理路由错误的函数
'encodestring' =>'c64e81e2856a63a2d9ca1178fcf0c8a4',
"db" => array(
'driver' => 'mysql', // 驱动类型
//'host' => 'mysql:host=localhost;dbname=yunbian', // 数据库地址
'host'=>'localhost',
'login' => 'root',
'password' => '',
'database' => 'api',
'prefix' => '',
'db_driver_path' => SP_PATH.'/Drivers/pdo.php',
),
'launch' => array(
'function_access' => array(array('spAccessCache','db')),
),
'ext' => array(
// 以下是Url_ReWrite的设置
'spUrlRewrite' => array(
'hide_default' => true, // 隐藏默认的main/index名称,但这前提是需要隐藏的默认动作是无GET参数的
'suffix' => '',
'sep' =>'/',
'map' => array(
'index' => 'main@index',
'recommend'=>'main@recommend',
'discovery'=>'main@discovery',
'now' =>'main@now',
'register' => 'main@reg',
'login' => 'main@login',
'tag' => 'blog@tag',
'pm'=>'user@pm',
'myfollow'=>'user@myfollow',
'mypost'=>'user@mypost',
'mylikes'=>'user@mylikes',
'myreplays'=>'user@myreplay',
'mynotices'=>'user@mynotice',
'edit' => 'add@edit',
'logout' => 'main@logout',
'custom'=>'userblog@customize',
'read' =>'userblog@show', //显示博客
'@' => 'userblog@index', //泛解析
),
'args' => array(
'tag' => array('tag','page'),
'gomember' => array('uid'),
'read' => array('bid','domain','uid'),
'mylikes'=>array('page'), //我喜欢的默认参数
'@' => array('domain','uid') //泛解析参数
),
),
'aUpload' => array( //上传
'savepath' => APP_PATH , //保存的绝对位置
'savedir' => 'attachs', //相对位置
'tmppath' => APP_PATH .'/attachs/tmp', //上传临时位置必须存在
'filetype' => 'jpg,png,gif,bmp,rar,zip,mp3,wma,mid,doc,pdf',
'filesize' =>4194304, //4M
'fileinput' =>'filedata' ,//默认文件上传域
'dirtype' => 4, //文件夹保存格式
'imgresize' => TRUE, //图片文件自动创建缩略图
'imgmask' => TRUE, //图片自动加水银
'imgmasksrc' => SP_PATH.'/Extensions/font/logo.png', //水印文字
'imgresizew' => 500, //缩略图比例宽度
),
'spVerifyCode' => array( //验证码扩展
'width' => 60, //验证码宽度
'height' => 32, //验证码高度
'length' => 4, //验证码字符长度
'bgcolor' => '#FFFFFF', //背景色
'noisenum' => 50, //图像噪点数量
'fontsize' => 22, //字体大小
'fontfile' => 'font/font.ttf', //字体文件
'format' => 'gif', //验证码输出图片格式
),
),
);
?>