Writes an array to the configuration file,& symbol why &
$config _arr = Var_export ($configdata, true);
$config _txt = " file_put_contents (' config.ini.php ', $config _txt);
$config _arr is an array with the & symbol in the array value and writes it to config.ini.php after the,& symbol becomes &
Is there a way to keep it the same?
------to solve the idea----------------------
This is not possible, you should have done it in the first HTML escape
$a = Array (' a ' = = ' &abc ');
$s = var_export ($a, 1);
Echo $s;
Array (
' A ' = ' &abc ',
)
------to solve the idea----------------------
References:
this solves the problem of character escaping when the parameter is received.
Now there is one more question:
The ConfigData array has character backslashes \, after this sentence
$config _arr = Var_export ($configdata, true);
After writing to the configuration file, the backslash becomes \ \ How to resolve
Stripslashes () Use this method to turn back.