// server document directory
$dir = $_SERVER[\'DOCUMENT_ROOT\'];
// wordpress install directory
$dir = ABSPATH;
安全地包含在wordpress中
add_action(\'plugins_loaded\', \'load_a_file\');
function load_a_file(){
if( is_admin() ){
$dir = $_SERVER[\'DOCUMENT_ROOT\'];
include_once( $dir . \'/file.php\' );
}
}