update.php & daemon: chdir to script directory using __FILE__ magic constant
This commit is contained in:
parent
b6c1201c33
commit
9b27cec8c0
|
@ -2,7 +2,8 @@
|
||||||
<?php
|
<?php
|
||||||
define('DISABLE_SESSIONS', true);
|
define('DISABLE_SESSIONS', true);
|
||||||
|
|
||||||
chdir(dirname($_SERVER['SCRIPT_NAME']));
|
chdir(dirname(__FILE__));
|
||||||
|
|
||||||
require_once "functions.php";
|
require_once "functions.php";
|
||||||
require_once "sanity_check.php";
|
require_once "sanity_check.php";
|
||||||
require_once "config.php";
|
require_once "config.php";
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
// Some configurable variable may be found below.
|
// Some configurable variable may be found below.
|
||||||
|
|
||||||
declare(ticks = 1);
|
declare(ticks = 1);
|
||||||
|
chdir(dirname(__FILE__));
|
||||||
|
|
||||||
define('DISABLE_SESSIONS', true);
|
define('DISABLE_SESSIONS', true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue