On Dec 20, 2007 7:06 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-12-20 at 19:54 +, George Pitcher wrote:
> > > On Thu, December 20, 2007 8:37 am, Christoph Boget wrote:
> > > > Let's say I have the following 3 files
> > > >
> > > > global.php
> > > > > > > function myFunc(
On Thu, December 20, 2007 1:54 pm, George Pitcher wrote:
> I have a functions file with over 400 functions (and that may be too
> many -
> but it works). I've been adding some error reporting in to my PEAR::DB
> queries, but wanted to know which page triggered the function. I went
> theough my php
__FILE__ == "global.php"
On 20/12/2007, Christoph Boget <[EMAIL PROTECTED]> wrote:
>
> Let's say I have the following 3 files
>
> global.php
>function myFunc() { echo __FILE__; }
> ?>
>
> one.php
>include( 'global.php' );
> echo 'You are in file: ';
> myFunc();
> ?>
>
> two.php
>in
Boget
Sent: Thursday, December 20, 2007 10:37 PM
To: PHP General
Subject: [PHP] Which file called the function?
Let's say I have the following 3 files
global.php
one.php
two.php
In each case, what is echoed out for __FILE__ is global.php. Apart from
analyzing the debug_backtrace array, i
On Thu, 2007-12-20 at 19:54 +, George Pitcher wrote:
> > On Thu, December 20, 2007 8:37 am, Christoph Boget wrote:
> > > Let's say I have the following 3 files
> > >
> > > global.php
> > > > > function myFunc() { echo __FILE__; }
> > > ?>
> > >
> > > one.php
> > > > > include( 'global.php
> On Thu, December 20, 2007 8:37 am, Christoph Boget wrote:
> > Let's say I have the following 3 files
> >
> > global.php
> > > function myFunc() { echo __FILE__; }
> > ?>
> >
> > one.php
> > > include( 'global.php' );
> > echo 'You are in file: ';
> > myFunc();
> > ?>
> >
> > two.php
> >
On Thu, December 20, 2007 8:37 am, Christoph Boget wrote:
> Let's say I have the following 3 files
>
> global.php
>function myFunc() { echo __FILE__; }
> ?>
>
> one.php
>include( 'global.php' );
> echo 'You are in file: ';
> myFunc();
> ?>
>
> two.php
>include( 'global.php' );
>
On Dec 20, 2007 9:47 AM, Christoph Boget <[EMAIL PROTECTED]> wrote:
[snip!]
> I need it primarily for debugging purposes. I've got a single function
> that's called by several files. And instead of modifying all the files
> calling the function to add logging, it would be nice to just modify the
Christoph Boget schreef:
>> I believe __FILE__ is resolved at compile time, not run-time which
>> means what you're seeing is expected behavior. I'm not sure how you'd
>> get the name of the file that a function call was made from.
>> Could you explain why you need this information in your appl
Christoph Boget wrote:
I believe __FILE__ is resolved at compile time, not run-time which
means what you're seeing is expected behavior. I'm not sure how you'd
get the name of the file that a function call was made from.
Could you explain why you need this information in your application,
an
> I believe __FILE__ is resolved at compile time, not run-time which
> means what you're seeing is expected behavior. I'm not sure how you'd
> get the name of the file that a function call was made from.
> Could you explain why you need this information in your application,
> and perhaps some
On 20 Dec 2007, at 14:37, Christoph Boget wrote:
Let's say I have the following 3 files
global.php
one.php
two.php
In each case, what is echoed out for __FILE__ is global.php. Apart
from
analyzing the debug_backtrace array, is there any way that myFunc()
would
display "one.php" and
Let's say I have the following 3 files
global.php
one.php
two.php
In each case, what is echoed out for __FILE__ is global.php. Apart from
analyzing the debug_backtrace array, is there any way that myFunc() would
display "one.php" and "two.php" respectively?
thnx,
Christoph
13 matches
Mail list logo