piotrpress/configer

此库可以从配置文件加载/保存 PHP 数组。

v2.0.0 2023-04-13 17:00 UTC

This package is auto-updated.

Last update: 2024-09-13 20:04:56 UTC


README

此库可以从配置文件加载/保存 PHP 数组。

安装

$ composer require piotrpress/configer

用法

require __DIR__ . '/vendor/autoload.php';

use PiotrPress\Configer;

$config = new Configer( '.config', [
    'key' => 'value'
] );

echo $config[ 'key' ]; 
$config[ 'key' ] = 'new_value';

$config->save();

需求

  • 分支 2.x 支持 PHP >= 8.0 版本。
  • 分支 1.x 支持 PHP ^7.4 版本。

许可证

MIT