14 lines
No EOL
354 B
PHP
14 lines
No EOL
354 B
PHP
<?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 ;");
|
|
}
|
|
} |