The poller can now be called even inside the "include" directory.

This commit is contained in:
Michael Vogel 2015-02-19 10:26:49 +01:00
parent 3ae4fcc71a
commit 96c642661e

View File

@ -1,4 +1,15 @@
<?php
if (sizeof($_SERVER["argv"]) == 0)
die();
$directory = dirname($_SERVER["argv"][0]);
if (substr($directory, 0, 1) != "/")
$directory = $_SERVER["PWD"]."/".$directory;
$directory = realpath($directory."/..");
chdir($directory);
require_once("boot.php");