My code is in the plugin's init function and I am attempting to file_get_contents() on the file within my wordpress plugin folder..

I am using...

file_get_contents(ABSPATH.'/wp-content/plugins/myplugin/myfile.html');

Unsure why can't I simply use...

file_get_contents('myfile.html');

myfile or myfile.html?

Do this:

file_get_contents('./myfile.html');

you are able to file function also, to see the particular file.

Refer link that follows

link text

Is php file in which you call file_get_contents known as directly or needed from another script? Road to files calculated from file, which run directly. For instance: in index.php my be needed 'plugins/i/plagin78.php If in plugin78.php you known as file_get_contents('myfile.html') then myfile.html ought to be put into same category as index.php, not plugin78.php