enablig api logging

This commit is contained in:
Fernando Ontiveros
2025-04-22 17:39:18 +00:00
parent 7093cab058
commit ef0f2d4bb8
7 changed files with 22 additions and 18 deletions

View File

@@ -7,7 +7,12 @@ array_pop($sections);
$pathHome = implode('/', $sections) . '/';
// Include the "paths_installed.php" file
require_once $pathHome . 'engine/config/paths_installed.php';
$documentRoot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
$pathParts = explode('/', $documentRoot);
array_pop($pathParts); // Remove the last part (usually the project folder)
$pathTrunk = implode('/', array_slice($pathParts, 0, -1)) . '/'; // Remove last part again
define('PATH_DATA', isset($_SERVER['PATH_DATA']) ? $_SERVER['PATH_DATA'] : $pathTrunk . 'shared' . '/' );
require_once PATH_DATA . '/config/paths_installed.php';
// Set the fonts styles file, for now the value is fixed (Maybe later we have another PDF engine)
$fileName = 'fonts.css';