Fix DMRnetwork error
This commit is contained in:
parent
78e39950f5
commit
2d5a5db58b
1 changed files with 14 additions and 6 deletions
|
@ -48,16 +48,24 @@ function setDMRNetwork($network) {
|
|||
}
|
||||
|
||||
function getDMRNetwork() {
|
||||
$fp = fopen('config/DMRNetwork.txt', 'r');
|
||||
$filename = 'config/DMRNetwork.txt';
|
||||
$network = '';
|
||||
if (file_exists($filename)) {
|
||||
$fp = fopen($filename, 'r');
|
||||
$network = fread($fp, filesize("config/DMRNetwork.txt"));
|
||||
fclose($fp);
|
||||
}
|
||||
return $network;
|
||||
}
|
||||
|
||||
function getDMRNetwork2() {
|
||||
$filename = '../config/DMRNetwork.txt';
|
||||
$network = '';
|
||||
if (file_exists($filename)) {
|
||||
$fp = fopen('../config/DMRNetwork.txt', 'r');
|
||||
$network = fread($fp, filesize("../config/DMRNetwork.txt"));
|
||||
fclose($fp);
|
||||
}
|
||||
return $network;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue