PHP code example of alpipego / toml-config
1. Go to this page and download the library: Download alpipego/toml-config library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alpipego / toml-config example snippets
$config = new Alpipego\TomlConfig\TomlConfig(['tomlfile.toml']);
$config->get('public');
// => `/var/www/public`
getenv('PATHS_APP_DIR'); // '/var/www/app'
$_ENV('PATHS_APP_DIR'); // '/var/www/app'
$config = new \Alpipego\TomlConfig\TomlConfig(['file1', 'file2']);
$config->writeEnv(__DIR__);
toml
[paths]
base = "/var/www"
[paths.app]
dir = "${paths.base}/app"