The poller can now be called even inside the "include" directory.
This commit is contained in:
parent
3ae4fcc71a
commit
96c642661e
1 changed files with 11 additions and 0 deletions
|
@ -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…
Reference in a new issue