Update the include path

This commit is contained in:
FusionPBX
2022-10-22 23:56:10 -06:00
committed by GitHub
parent 720eb58a89
commit f40621141f

View File

@@ -27,15 +27,14 @@
//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;
$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