如何在子目录Wordpress安装中包含外部PHP文件?

I have a Wordpress installation in directory /blog.

I am trying to include multiple PHP files located in the root parent directory using relative paths such as "../../include/file.php".

Since Wordpress uses its install directory as the base, I tried to change it by including

<base href="http://mydomain.com" />

inside of the head, but it had no effect.

What can I do appropriately call these PHP files in my Wordpress theme?

You can try such hack for file in parent directory:

$path =  dirname( dirname( __FILE__ ) ) . '/some_file.php';

you can try put this in wp-config

$rootpath = explode( basename( dirname(__FILE__) ), ABSPATH ); 
define( 'MYROOT', $rootpath[0] );

And then, for anyfile in the root directory :

include( MYROOT . 'somefile.php');