parent
b48220f0ea
commit
e0226507e1
|
@ -155,10 +155,14 @@ class AirtimeIni
|
||||||
{
|
{
|
||||||
$lines = file($p_filename);
|
$lines = file($p_filename);
|
||||||
$n=count($lines);
|
$n=count($lines);
|
||||||
for ($i=0; $i<$n; $i++) {
|
foreach ($lines as &$line) {
|
||||||
if (strlen($lines[$i]) > strlen($p_property))
|
if ($line[0] != "#"){
|
||||||
if ($p_property == substr($lines[$i], 0, strlen($p_property))){
|
$key_value = split("=", $line);
|
||||||
$lines[$i] = "$p_property = $p_value\n";
|
$key = trim($key_value[0]);
|
||||||
|
|
||||||
|
if ($key == $p_property){
|
||||||
|
$line = "$p_property = $p_value".PHP_EOL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue