Most people will include/require their file resources in a loader.php script file. And then they will include the loader.php file in all of their scripts. But of course this can be a bit wasteful time-wise if you have a lot of files and you only need specific ones for the execution of a php script. So the next more advanced thing people will do is selectively load php files using if- or switch- statements (conditional-loading) based on functionality needed. At least that's what I've done in the past. My current way is what I think the best: use function "spl_autoload_register". I don't use outside frameworks/libraries for the most part.
Check out the php docs on this function; this is the ticket I think.
http://php.net/manual/en/function.spl-a ... gister.php
Read about what this function does and then also, to expand on what I'm saying here I had shared my experience/process with the function by making a post to that page. To find my post on that page, search for "Rnealxp"
To answer your question, the files must be loaded one way or another. How and where can vary. A popular PHP dependency manager is called "composer". This tool can be used on its own or may be used within a broader PHP framework. See this url: https://getcomposer.org/