PHP code example of okami-chen / yaml-config

1. Go to this page and download the library: Download okami-chen/yaml-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/ */

    

okami-chen / yaml-config example snippets



$file   = 'config.yml';
$data   = Yaml::load($file);


$file   = 'config.yml';
$data   = Yaml::load($file);
$data['mysql']['port'] = 3307;
Yaml::save($file,$data);