Page 1 of 1

file of caller of my method

Posted: Thu Jul 08, 2004 1:07 pm
by junky
hi guys,
ive a problem here:
i've a class named Coke.
in that class Coke, i've a method blah.
in my method blah, i wanna print the name of the file calling that method.
i know i can use __FILE__, but its gonna return me the name of my class, no?

How can i grab taht information ?
thanks.

Posted: Thu Jul 08, 2004 2:29 pm
by junky
i've found a solution by myself.

i've to add this into my method:

Code: Select all

global $SCRIPT_NAME;
and if i wanna print the caller of this method: i just need to:

Code: Select all

print $SCRIPT_NAME;
into my method.