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.
file of caller of my method
Moderator: General Moderators
i've found a solution by myself.
i've to add this into my method:
and if i wanna print the caller of this method: i just need to:
into my method.
i've to add this into my method:
Code: Select all
global $SCRIPT_NAME;Code: Select all
print $SCRIPT_NAME;