brightfish / enhanced_ini
使用增强功能读取INI文件
dev-master
2019-12-25 21:01 UTC
Requires (Dev)
- phpunit/phpunit: ^8.0@dev
This package is auto-updated.
Last update: 2024-09-27 20:05:56 UTC
README
使用增强功能读取.ini文件
使用'default'章节
- 存在一个默认章节,可以用来为其他所有章节提供默认键/值。
- 默认章节名称为
[default]
,但可以更改为例如[_default]
或[def-values]
。
[default] key1=1 [chapter1] // key1 will exist and = 1 key2=2
{参数}替换
- 可以在值定义中使用键名作为变量,并在访问值时进行替换。
- 默认的变量语法为
{key}
,但可以更改为例如{$key}
或[key]
。
[default] domain=www.example.com [chapter1] code=4567 url=https://{domain}}/?code={code} // url will be = https://www.example.com/?code=4567