Is it possible to place confic.inc.php outside the DocumentRoot for security reasons in PHP?

Placing the configuration file (confic.inc.php) outside the DocumentRoot can enhance security by preventing direct access to sensitive information. This way, even if someone manages to access your server's files, they won't be able to view the configuration details. To implement this, you can define the file path to the configuration file in your PHP script using an absolute path outside the DocumentRoot.

<?php
// Define the absolute path to the configuration file outside the DocumentRoot
$configFilePath = '/absolute/path/to/confic.inc.php';

// Include the configuration file
include($configFilePath);

// Your PHP code here
?>