Update the include path
This commit is contained in:
parent
720eb58a89
commit
f40621141f
|
|
@ -26,16 +26,15 @@
|
|||
*/
|
||||
|
||||
//set the include path
|
||||
if (defined('STDIN')) {
|
||||
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
|
||||
preg_match("/^(.*)\/secure\/.*$/", $document_root, $matches);
|
||||
$document_root = $matches[1];
|
||||
set_include_path($document_root);
|
||||
$_SERVER["DOCUMENT_ROOT"] = $document_root;
|
||||
if (defined('STDIN')) {
|
||||
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
|
||||
set_include_path(parse_ini_file($conf[0])['document.root']);
|
||||
}
|
||||
else {
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
if (!defined('STDIN')) { include_once "root.php"; }
|
||||
//include files
|
||||
require_once "resources/require.php";
|
||||
|
||||
//define a function to remove html tags
|
||||
|
|
|
|||
Loading…
Reference in New Issue