Thanks for the reply. That almost got me there. I guess let me tell you the set up.
I have index.php that has an include in it calling, file.php that goes several sub directories in. file.php would have the function that returns the directory which it's in.
So I go to index.php, which is including file.php, have it return the directory of file.php, not index.php.
I tried $_SERVER['SCRIPT_FILENAME'], but that calls the directory of index.php, not file.php.
I hope that made sense. Is this really possible?
Thanks!