My project has two entry point
project (root-folder)
/config(folder)
config.php
/service(folder)
service.php
index.php
for example
File 1:/index.php ( first entry point) - here we include the config form the config folder
<?php
require_once('config/config.php');
require_once('service/service.php');
?>
File 2:service/service.php - here we include the config form the config folde
<?php
require_once('../config/config.php');
?>
if i call the File 2:service/service.php has no fatal error
but when i call the File 1:/index.php it became the fatal error as failed to require 'service/service.php' because it require again and config path is invalid
How to solve this issue.