One of the ncie things about PHP is that if you do an include/require it works off the directory where the file is (or rather the URI of the request). That means that if you want to include further file you don't need to know from where the original script is running. All you need to know is where the current script is.
Now I want to load a text file and process it. file_get_contents() seems an obvioius way of loading it. The problem is I don't have that same luxury. I either need to specify the file path absolutely, which I don't want to do, or I have to know the location relative to the file that initiated the call, which I don't like either.
Require/include don't seem to work with non-PHP files and that would essentially echo the contents anyway (yes I know I could wrap that in an ob_start(), etc).
Suggestions?