So, file_get_contents('myDir/script/txtfiles') would start at wherever Apache or the shell interpreter had fired off your script[/i/, then drill down into myDir, then script then txtFiles.
How can you tell where the shell interpreter has fired off your script *THIS TIME* ?
For future reference, the path to root can be
determined by $_SERVER['SCRIPT_URL'] it will
end up being something like:
/onedirectoryoffroot/adirectorybelowthat/
so you ../ one less times than there are /'s in
the script_url ... and then you are at the root
directory, ready to crawl down the
*SERVERS TREE* and into wherever you need..
example:
if the script_url is:
/2009-10-07/posts/
and you wanted to get somewhere else
the route would be:
../../wp-content/plugins/myplugindir/myfile.php
just so its up here for when i forget it a week from now.
