Because these websites are large applications dealing with varied requests with a number of functions, the design pattern I have adopted is as follows. I have an index.php in the root that handles all of the requests, and I use .htaccess to make se friendly urls using mod_rewrite. This index.php file receives and sanitizes all $_GET['variables'], it then includes a settings file that includes all the default variables, and includes an includes file that includes all the php files for the functions the website uses. It then handles the request to send to the appropriate function for processing, then generates the HTML. In summary:
Start -> Receive Request -> Sanitize Request -> Load Settings -> Include Functions -> Handle Request -> Send to appropriate Function for Processing -> Generate HTML -> End
Now then, I am concerned this approach is not efficient on server resources, thus will not scale well if the application were to be used by a lot of users. If I am correct, could someone please suggest a better design pattern to approach my work with. Thank you for your time.