_Late answer_

## How to include your files the right way:

    function wpse1403_bootstrap()
    {
    	// Here we load from our includes directory
    	// This considers parent and child themes as well    
    	locate_template( array( 'inc/foo.class.php' ), true, true );
    }
    add_action( 'after_setup_theme', 'wpse1403_bootstrap' );

The same works in plugins too.

## How to get the right path or URi

Also take a look at file system API functions like: 

* `home_url()`
* `plugin_dir_url()`
* `plugin_dir_path()`
* `admin_url()`
* `get_template_directory()`
* `get_template_directory_uri()`
* `get_stylesheet_directory()`
* `get_stylesheet_directory_uri()`
* etc.

## How to reduce the number of `include/require`

If you need to fetch _all_ files from a directory go with 

    foreach ( glob( 'path/to/folder/*.php' ) as $file )
        include $file;

Keep in mind that this ignores failures (maybe good for production use)/not loadable files.

To alter this behavior you might want to use a different config during development:

    $files = ( defined( 'WP_DEBUG' ) AND WP_DEBUG )
        ? glob( 'path/to/folder/*.php', GLOB_ERR )
        : glob( 'path/to/folder/*.php' )
    
    foreach ( $files as $file )
        include $file;