Good afternoon,
I have a problem with the topic of internal routes on a platform in php.
This is the error message:
Fatal error: require_once(): Failed opening required 'http://localhost:8080/CBS/CBSPlatform/html/links.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\CBS\CBSPlatform\dashboard.php on line 34
This is what I have in my mind and in the code, which is surely wrong:
When I do the require_once to put every part of the page ...
<?php require_once($CRDomain . "html/header.php"); ?>
... I put the $ CRDomain that saves the path of the page, to access each file instead of by assets / css / css.css access with link . I do this for "supposedly" when it comes to the case that for example, the html pages to administer something are in administration / instead of in the main index folder. do not have to add ../ in each file that is entered in that page.
Returning to the error above, in the file links.php, which supposedly does not find, I have all the example css:
<link href="<?php echo $CRDomain; ?>assets/css/mainstyle.css" rel="stylesheet" type="text/css" />
With the CRDomain also to access as I said before.
The fact is that I do not understand what I'm doing wrong, if someone could review the code to tell me that I'm doing wrong with the routes of the files I would appreciate it very much.
I do not know if I've explained myself correctly, if not tell me and I try to clarify it more in some way.
Greetings