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() {
|
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"));
|
$network = fread($fp, filesize("config/DMRNetwork.txt"));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
}
|
||||||
return $network;
|
return $network;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getDMRNetwork2() {
|
function getDMRNetwork2() {
|
||||||
|
$filename = '../config/DMRNetwork.txt';
|
||||||
|
$network = '';
|
||||||
|
if (file_exists($filename)) {
|
||||||
$fp = fopen('../config/DMRNetwork.txt', 'r');
|
$fp = fopen('../config/DMRNetwork.txt', 'r');
|
||||||
$network = fread($fp, filesize("../config/DMRNetwork.txt"));
|
$network = fread($fp, filesize("../config/DMRNetwork.txt"));
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
}
|
||||||
return $network;
|
return $network;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue