In order to load a class without manually include it you should take a look at spl_autoload_register that enables you to automatically load classes whenever required by the application.
As for the other question, well, it's all up to your design. If you want to load the common "controller" and "action" you should create a routable folder (this means the folder in which only controllers can stay) and place all the controller classes and then create a routable action space (the group of routable methods inside a controller class, usually is by defining the convention that actions methods are prefixed by action_
). When you are done with that simply create your controllers like this:
class Blog {
public function action_posts() { ... };
}
and manage it so that the URL /blog/posts/
will call this. (It just needs the same URI manipulation you have already proved to be good at). (Notice that the autoloader should handle the including of the actual class file by itself without requiring you to load all controller classes). Once you have the controller name and action you just need of something on the line of:
if (class_exists($controller)) {
$app = new $controller;
if (method_exists($app, $action)) {
$app->$action(); // also take a look at call_user_func and call_user_func_array
}
}
You can also allow parameters, but that is going to be quite difficult, in order to allow this kind of result:
class Blog {
public function action_post($id) { ... };
}
and be called by /blog/post/14/
for example.
When dealing with URI also remember that you could have bad inputs and that you should handle them, but if you have created the correct routing space you are half way done already.
Finally if you want to have inspiration or for anything else, just take a look at CodeIgniter (which is one of the most easy to learn frameworks out there) or any other framework.
Hope it helped.