基础配置文件说明
WeiCot Framework 快速开发教程 -www.weicot.com
<?php
/**
* Created by PhpStorm.
* User: jiang
* Date: 2018/11/18
* Time: 11:50
* ---------etc 配置文件
* Config.ini 空的配置文件可自由配置(2016/5/23/File::getConfig() 获取)
* Config.php 应用层配置文件
* Initialization.php 初始化文件
*/
return [
"site" => [ //站点配置
'abbreviation' => '易定制', //简称
'copyright' => '易定制智能供应链服务系统 (易定制) 版本:v' . EDZCV . ' Copyright © 2016-3000 weicot.com 联系我们:<a href="mailto:1050653098@qq.com">1050653098@qq.com</a>',
'logo' => 'skin/frontend/images/logo3.png', //前台logo
'admin_logo' => 'skin/frontend/images/logo6.png', //后台logo
'protocol' => 'http', //协议配置
'site_dir' => '', //网站存放的目录 example/'
'admin_path' => 'admins', //后台管理员类名
'open_registration' => true, //开放注册
'close_site' => false, //关闭站点
'layui_version' => 1545041465480, // 为了更新 js 缓存
'contact_ht' => '1050653098', //服务QQ
],
'theme' => [ //页面所使用的主题
'template_dir' => "app/code/", //模板路径默认路径 app/code/前后端分离的路径 skin/frontend/template
"adminhtml" => "default", // 后台主题 adminhtml
"frontend" => "default", // 前台主题 frontend
],
'module' => [ //系统中一些模块配置文件管理
/***
* > _platforms
* [Supported Operating Platforms]
* Supported Platforms:
* linux_amd64 [linux amd64(x86-64)]
* linux_arm64 [linux arm64 ]
* macos_amd64 [macos amd64(x86-64)]
* macos_arm64 [Apple M Series Processor Similar M1 ]
* windows_amd64 [windows amd64(x86-64)]
* Default: <Automatic Recognition>
* About Automatic RecognitionThe: 自动识别平台仅支持基于amd64(x86-64)的windows和Linux 操作系统
*/
'_platforms' => 'automatic', //操作系统以及平台 linux_amd64,linux_arm64,macos_amd64,macos_arm64,windows_amd64 自动识别平台仅支持基于amd64(x86-64)的windows和Linux 操作系统
'_disable' => [], //禁用的的模块
'_sql_install' => true, //启用数据库自动安装
'custom' => [
'design_tools' => true, //默认设计器模块
'default_design_module' => 'designx',
],
],
"debug" => [
'developer_ip' => [], //开发者所在的ip
'display_errors' => true, //显示错误信息
'show_path' => false,//是否 显示Controller地址地址及类名 显示Block地址及类名 显示Template地址及类名 false
'design_tools' => false, //设计工具是否开启 debug
],
"task" => [ //各种任务执行路径
'run_dir' => '/home/wwwroot/erp', //定时任务运行路径
'work_dir' => '/home/wwwroot/erp',
'local_host' => 'http://127.0.0.1/media/' //本地工作域名
],
"sync" => [ // 同步配置
'image' => [ //图片同步服务器
'host' => "127.0.0.1", //本地同步服务器 ip
'port' => '2015', //本地同步服务器 host
'sync_domain' => 'http://oss1.amazon.ncaz.com', //同步服务器 host
'default_domain' => 'http://oss1.amazon.ncaz.com', //用户模板中默认的导出域名
],
"im" => [] // im 消息同步服务器
],
"components" => [ //提供的组件
"mongoDB" => [],
"elasticsearch" => [],
"redis" => [],
"swoole" => [],
"database" => [ // 数据库配制
//pdo persistent 长链接
'pdo_persistent' => true,
//pdo 直接输出错误
'show_error' => false,
//错误日志文件
'log_file' => './var/log/error_long_name.log',
// 数据库类型
'type' => 'mysql',
// 数据库连接DSN配置
'dsn' => '',
// 服务器地址
'hostname' => '127.0.0.1',
// 数据库名
'database' => 'you database ',
// 数据库用户名
'username' => 'username',
// 数据库密码
'password' => 'password',
// 数据库连接端口
'hostport' => '3306',
// 数据库连接参数
'params' => [],
// 数据库编码默认采用utf8
'charset' => 'utf8',
// 数据库表前缀
'prefix' => '',
// 数据库调试模式
'debug' => false,
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效
'rw_separate' => false,
// 读写分离后 主服务器数量
'master_num' => 1,
// 指定从服务器序号
'slave_no' => '',
// 是否严格检查字段是否存在
'fields_strict' => true,
]
],
"security" => [ //安全配置
'no_login' => [], //通过这里配置将会覆该模块的控制器的权限配置
'ip_control' => [ // ip 列表控制
'type' => 'blacklist', // whitelist
'list' => []
]
]
];