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