I am trying to load the header file in the home class using a loader. This works on the local server and shows the whole web page.
After uploading the codes on to the server, the codes throws a fatal error
Fatal error: Uncaught LogicException: The template "common/Header" could not be found at "App/View/template//common/Header.tpl"
Looking at the error above, I notice that there is a double forward '//'
"App/View/template//common/Header.tpl"
I did not add this to the loader code. This is what is in my loader
$file = APP_DIR . 'Controllers/' . str_replace("\\", '/', $path_to_controller) . ".php";
$relative_controller = 'Controllers' . preg_replace('/[^a-zA-Z0-9]/', '', $path_to_controller);
Why is the web server adding a double forward slash on its own?