将其放入插件文件:
add_action(\'init\', \'captureFileToVariable\');
function captureFileToVariable(){
$fileName = "FileIWantToLoad.txt";
$pluginDirectory = plugin_dir_path( __FILE__ );
$filePath = $pluginDirectory . $fileName;
$fileContents = file_get_contents($filePath);
//die($fileContents);
}