New answers tagged

0

Put this in your plugin file: add_action('init', 'captureFileToVariable'); function captureFileToVariable(){ $fileName = "FileIWantToLoad.txt"; $pluginDirectory = plugin_dir_path( __FILE__ ); $filePath = $pluginDirectory . $fileName; $fileContents = file_get_contents($filePath); //die($fileContents); }



Top 50 recent answers are included