Hello!
In the tokenizer parser, __FILE__ is handeled a bit differently, it checks for
the T_FILE token while parsing and then replacing it during the parsing
phase.
I guess in some cases it wont stumble on that token for some reason.. in what
way were you using __FILE__?
The problem with the __FILE__ replacement thats done in pre42 is that it might
replace occurances in strings so I'd rather not use it.. Of course, if there
is no other way...
cheers
/Linus
On Saturday 21 May 2005 16.15, Aaron McDonald wrote:
> I already posted this on the IRC channel but just to be sure someone sees
> it, here it is again.
>
> I was having a problem debugging php code that used the __FILE__ variable.
> I noticed that GubedParserPre42.php replaces all occurrences of __FILE__
> and since I'm using php 4.3.9, I added the same replacement code to
> GubedParserTokenizer.php and it seems to have fixed the problem. In
> function gbdParseCode, have the preg_replace call also replace
> "/\_\_FILE\_\_/" with "'".realpath($gbdThisScript)."'"
>
> Thanks,
> Aaron McDonald
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Gubed-devel mailing list
> Gub...@li...
> https://lists.sourceforge.net/lists/listinfo/gubed-devel
|