Browse Source

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

pull/1407/head
Michael Vogel 7 years ago
parent
commit
96c642661e
  1. 11
      include/poller.php

11
include/poller.php

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

Loading…
Cancel
Save