I'm very sorry for asking such stupid questions which there are answers here, but I just don't get, and I'm stuck into it.
So, I will try to explain simply, what did I do. I'm trying to make a simple cooperative website for personal use and the project is on localhost. I use a ready template with HTML code, and I break it apart to topbar.php, home-content.php, footer.php, and I placed it in another folder called Templates.
Everything seems to work fine from the root folder, but when I try to made a subfolder - calculator and made an index.php with:
<?php
include("../Templates/topbar.php");
include("../Templates/footer.php");
then the HTML loads, but all links tags seem to not work. The content is loaded, but without the CSS, JS, and others.
I read about it and tried with:
$_SERVER['DOCUMENT_ROOT']."/Templates/topbar.php
It doesn't seem to work.
Also into the topbar.php file, there is another include, which is include "header.php" with the <head> part of the HTML.
When I try to get into
root/calculator
It shows me this error:
Warning: include(/Templates/header.php): failed to open stream: No such file or directory in C:\xampp\htdocs\root\Templates\topbar.php on line 2
Warning: include(): Failed opening '/Templates/header.php' for inclusion (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\root\Templates\topbar.php on line 2
There are many answers to this subject, but can someone explain to me how can I deal with this like to a really silly guy...
Thank you all.