badbreze / simple-ini
PHP 简单 INI 操作类
dev-master
2016-05-17 09:40 UTC
Requires
- php: >=5.3.0
- hoa/exception: ~1.0
This package is not auto-updated.
Last update: 2024-09-14 19:20:04 UTC
README
SimpleIni 工具是一个小巧的 INI 文件工具,便于在 INI 文件中读写值。
安装
使用 Composer
composer require badbreze/simple-ini
示例
use IniUtil\SimpleIni;
require_once "vendor/autoload.php";
$ini = new SimpleIni(__DIR__.'/helloworld.ini');
$hello = $ini->getVariable('hello');
echo($hello);
//result: world
在这个例子中,我们有一个名为 "helloworld.ini" 的文件,内容如下。
hello = world
@作者 Damian Gomez