]> git.wh0rd.org Git - tt-rss.git/commitdiff
update.php & daemon: chdir to script directory using __FILE__ magic constant
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 15 Apr 2011 08:38:11 +0000 (12:38 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 15 Apr 2011 08:38:11 +0000 (12:38 +0400)
update.php
update_daemon2.php

index 4598e7c66f3db942189e4dc100ef8577141214d0..9c9c6ae8de742de18d06cd7b5c36638167e7f8f4 100755 (executable)
@@ -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";
index 1b1044238c0bcf5cf1ab0e1477e097b57d98806b..6ccdbcb100e5a7fc2afd614563a1098159b92e76 100755 (executable)
@@ -4,6 +4,7 @@
        // Some configurable variable may be found below.
 
        declare(ticks = 1);
+       chdir(dirname(__FILE__));
 
        define('DISABLE_SESSIONS', true);