mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 19:26:08 +05:30
[TASK] update composer
This commit is contained in:
parent
3c6936349f
commit
a685bcf91b
116 changed files with 4837 additions and 8167 deletions
|
|
@ -52,18 +52,19 @@ function config($key, $value = null)
|
|||
$_config[$key] = $value;
|
||||
}
|
||||
|
||||
function save_config($data = array(),$new = array()){
|
||||
function save_config($data = array(), $new = array())
|
||||
{
|
||||
global $config_file;
|
||||
|
||||
$string = file_get_contents($config_file) . "\n";
|
||||
|
||||
foreach ($data as $word => $value) {
|
||||
$value = str_replace('"','\"',$value);
|
||||
$value = str_replace('"', '\"', $value);
|
||||
$string = preg_replace("/^" . $word . " = .+$/m", $word . ' = "' . $value . '"', $string);
|
||||
}
|
||||
$string = rtrim($string);
|
||||
foreach ($new as $word => $value) {
|
||||
$value = str_replace('"','\"',$value);
|
||||
$value = str_replace('"', '\"', $value);
|
||||
$string .= "\n" . $word . ' = "' . $value . '"' . "\n";
|
||||
}
|
||||
$string = rtrim($string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue