I find that using the php include file is extremely annoying. Especially using the relative path…. I was thinking it is a good idea to have a single.php file, store all the “.php” absolution path, and return it when the user need to include it…just like a little config file for storing all the file path, if there is any changing path, I just need to modify one place, What do you think? Any suggestions? Thank you.
I find that using the php include file is extremely annoying. Especially using the
Share
I work with a config file for my projects and have some constants like:
So now I can easily change that path. When including a file I use
Now I can easily change between versions. So if I’m testing some new things I can make a include_test folder, change the INCLUDES_DIR and the whole project runs on the new folder.