I am trying to find a way to make the include_once(); path start from the beginning directory and then find the path e.g. instead of ../../../path/to/file I would have /path/to/file. If I do do that /path/to/file it says no such file or directory, here is my direct code
<?php
include_once("/assets/page_assets.php");
?>
If you have an Apache server
"/assets/page_assets.php"meansfrom the root of the disk, not from the root folder of the server. If you are talking about some otherbeginning directorythen define physical path (path in the file system of the server, not the web path) to it as a separate constant/variable and prepend it to the included path as shown above.