I want to know the filename from where a javascript function has been called.
example.

I have a php file Test.php. In test.php file I am calling a whocalled(); javascipt function.

Now how to get test.php filename in whocalled(); function.
The whocalled(); function is called from many php file and i want to know the php filename and based on that another code is being called.