This repository has been archived on 2024-06-20. You can view files and clone it, but cannot push or open issues or pull requests.
peryoudow/apps/config.php

14 lines
354 B
PHP
Raw Permalink Normal View History

2020-01-06 14:14:28 +01:00
<?php
class MyConfig
{
public static function read($filename)
{
$config = include 'config/'.$filename.'.php';
return $config;
}
public static function write($filename, array $config)
{
$config = var_export($config, true);
file_put_contents('config/'.$filename.'.php', "<?php return $config ;");
}
}