Possible Duplicate:
Finding the PHP File (at run time) where a Class was Defined
I am working with a server that someone else (currently unavailable) set up. I am trying to locate the source of a class that apache (or something else) is preloading so that I can update the source code to the correct version of the class. Running this:
<?php echo class_exists('className')? "yes": "no"; ?>
(as the entire php file) prints out yes. How do I find out what file that class is coming from? I’ve grepped the server and have a long list of files that it COULD be, but would rather just know which file I need to change without doing a lot of guess and check. Is there function that will tell me the file with the source code for that class name?
Thanks
Check the include path(s) to see which directories are relevant.
get_include_path
http://php.net/manual/de/function.get-include-path.php
Use Reflection class to get the actual file
https://www.php.net/manual/de/reflectionclass.getfilename.php