I really have a problem with including php files. I need to work with a large number of folders, so it is sometimes difficult to include a php page.
ex. file in the folder: inc / chat / scripts / index.php want to include the file from php / ajax / nd.php
include("../../../php/ajax/nd.php");
So my question is, is there any other way to do this instead of using ../ all the time? (I don’t know which server will run my page in the future to set a static path).
is it better to use include or include_once (to avoid another call)?
source
share