[PHP] Re: Which file called the function?

2007-12-21 Thread Nathan Rixham
global.php ?php function myFunc($file) { echo $file; } ? one.php ?php include( 'global.php' ); echo 'You are in file: '; myFunc($file = __FILE__); ? might work.. Christoph Boget wrote: Let's say I have the following 3 files global.php ? function myFunc() { echo __FILE__; } ?

[PHP] Re: Which file called the function?

2007-12-20 Thread Shawn McKenzie
This should work: global.php ? function myFunc($file) { echo $file; } ? one.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(__FILE__); ? two.php ? include( 'global.php' ); echo 'You are in file: '; myFunc(__FILE__); ? Christoph Boget wrote: Let's say I have the