Deal with the potential that SERVER_NAME may not be a part of the superglobal _SERVER.
This commit is contained in:
parent
b1b54536eb
commit
a6c7ecc721
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ register_shutdown_function('shutdown');
|
||||||
// make sure our file_exist returns fresh data. Likely not necessary.
|
// make sure our file_exist returns fresh data. Likely not necessary.
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
|
||||||
if(in_array($_SERVER['SERVER_NAME'],array('localhost','a.io'))) {
|
if(isset($_SERVER['SERVER_NAME']) && in_array($_SERVER['SERVER_NAME'],array('localhost','a.io'))) {
|
||||||
$conf = json_decode(file_get_contents(getcwd() . '/../conf/wia.conf'));
|
$conf = json_decode(file_get_contents(getcwd() . '/../conf/wia.conf'));
|
||||||
} else {
|
} else {
|
||||||
$conf = json_decode(file_get_contents('/home/atomaka/conf/wia.conf'));
|
$conf = json_decode(file_get_contents('/home/atomaka/conf/wia.conf'));
|
||||||
|
|
Loading…
Reference in a new issue