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
1 changed files with 11 additions and 0 deletions

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");