0
I have the following structure:
|- /root
|-- /services
|--- /criminal records
|-- /view
|--- Dashboard.php
|--- php menu.
|--- /registers
|---- /people
|----- Include_people.php
|-- /scripts
|-- js menu.
Inside Dashboard.php I have the following javascript: $("body"). load("menu.php") which is used to popular a navbar with the options.
- Inside menu.php I have the import of the menu.js file
The problem happens when I try to populate the same menu within "Inclu_people.php" because it is taking the path relative to that file (root/registrations/people). Even if I use in load the path ".. /.. /menu.php" it tries to find the menu.js in the directory for root/entries/people/.
There would be a way for me to import these files obsolutely, without having to leave all the files in the same directory?