tgrj/tweb_config 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tgrj/tweb_config

最新稳定版本:v2.0.0

Composer 安装命令:

composer require tgrj/tweb_config

包简介

minimalistic config system

README 文档

README

minimalistic config system

About

This is part of the core of my tweb micro framework. It serves as the config for certain other aspects of the modules / package.

Usage

  • tweb_config_get(string $key)
    • This will get the config value of the given key. This key can be some better readable array-depth like for [ 'a' => [ 'aa' => 1, 'ab' => 2 ] ] you could use 'a.ab' as a key to get the config value 2. There is a default config (tweb.conf.php) in the modules src folder, By default you can create config/tweb.conf.php relative from the project path. It should return an array. This is able to overwrite the default values, but you can also have your own config keys and values. By overwriting the global variables $TWEB_CONFIG_PATH and $TWEB_CONFIG_FILE you can define in which folder the user config is stored. You should change these values before calling tweb_config() for the first time.
  • tweb_config_set(string $key, mixed $value)
    • Normally not to use during runtime, but tests only. But maybe there are situations where you want to alter the config during runtime. The config won't be saved, though.

By default the path getcwd() . '/src/config/tweb.conf.php' is searched for user conf overwrites. You could overwrite it during runtime with tweb_config_set() ... eh, so maybe this function can be usefull during runtime, I guess. Just use it like you want. Hope this will help.

统计信息

  • 总下载量: 114
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 9
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固