Re: Bug #13936 Updated: Magical Constant __FILE__ contains wrong information on included files
| From: | Joao Prado Maia | Date: | Mon, 05 Nov 2001 22:55:17 +0000 |
| Subject: | Re: Bug #13936 Updated: Magical Constant __FILE__ contains wrong information on included files | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-69668@lists.php.net to get a copy of this message | ||
On Mon, 5 Nov 2001, Jeroen van Wolffelaar wrote:
> On Mon, 5 Nov 2001, Joao Prado Maia wrote:
>
> >
> > Good to hear that this bug was somehow fixed for 4.2.0. However, how can I
> > write a portable way to get the full path of a script ? I don't think is
> > acceptable for me to say to my users 'you shouldn't use 4.0.6, go use
> > 4.0.5 or PHP CVS'.
>
> It was broken in 4.0.3pl1 and 4.0.4pl1 too, so I guess it never worked
> correctly until 4.1.0 of 4.2.0 (didn't test 4.1.0)
>
Indeed, and thats even worse than I thought then. I'm still wondering why
in hell a similar routine works perfectly in the same server but in a
different virtual host.
It should be the same scenario, as it is basically a file including a
class, which can call the error handler class statically to log the error.
This call to the static class uses __FILE__ and __LINE__, and they work as
I would expect - giving me the full path and line.
Maybe I will have more time tonight to try to reproduce a more simple
version of this working routine.
--Joao
--
João Prado Maia <jpm@phpbrasil.com>
http://phpbrasil.com - php com um jeitinho brasileiro
--
Precisando de consultoria em desenvolvimento para a Internet ?
Impleo.net - http://impleo.net/?lang=br