update.php & daemon: chdir to script directory using __FILE__ magic constant

This commit is contained in:
Andrew Dolgov 2011-04-15 12:38:11 +04:00
parent b6c1201c33
commit 9b27cec8c0
2 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,8 @@
<?php
define('DISABLE_SESSIONS', true);
chdir(dirname($_SERVER['SCRIPT_NAME']));
chdir(dirname(__FILE__));
require_once "functions.php";
require_once "sanity_check.php";
require_once "config.php";

View File

@ -4,6 +4,7 @@
// Some configurable variable may be found below.
declare(ticks = 1);
chdir(dirname(__FILE__));
define('DISABLE_SESSIONS', true);