Re: Info about php script being executed from within function.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Info about php script being executed from within function.

From: Sandman <mr@sandman.net>
Date: Thu Aug 25 2005 - 19:21:31 CEST

In article <xjpy9lyrf0yw$.zpmzp3bnqjgh$.dlg@40tude.net>,
 Alvaro G Vicario <alvaro_QUITAR_REMOVE@telecomputer.com> wrote:

> *** Sandman wrote/escribió (Thu, 25 Aug 2005 14:01:05 +0200):
> > The constant __FILE__ points to the file in which gauge was *defined* (i.e.
> > init.php) and superglobals like $_SERVER["PATH_TRANSLATED"] point to
> > index.php
> >
> > Anyone knows how to find out what file called on a function?
>
> From the constant __FUNCTION__, I presume:
>
> http://es2.php.net/manual/en/language.constants.predefined.php

Eh? The constant __FUNCTION__ contains the name of the current function, which
when used inside of gauge() naturally returns "gauge".

-- 
Sandman[.net]
Received on Mon Oct 24 02:09:31 2005