Re: How to get script filename in module RINIT function
| From: | Johannes Schlüter | Date: | Tue, 10 Aug 2010 17:33:28 +0000 |
| Subject: | Re: How to get script filename in module RINIT function | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49271@lists.php.net to get a copy of this message | ||
Hi,
On Tue, 2010-08-10 at 18:43 +0200, Bostjan Skufca wrote:
>
> Interesting idea. Didn't think about that. But it isn't
> reliable either:
> If an auto prepend file is set this will be in the list first.
>
> So simple thing, so easy to overlook...
> But I believe it is fairly easy to check if autoprepend is enabled and
> use second item from the list in that case, or (in case that is not
> posible) introduce new ini setting for that matter.
An auto_prepend_file might include other things :-)
I don't think there's lots of code with auto prepend out these days (I
only encountered it twice myself, i think) So in most cases it might be
ok to do if (auto_prepend_set) { error("oh, i can't work!"); }.
> Aaaa, again, so simple. I feel such a newbie, but obviously not
> without a reason :)
That's fine :-)
> This would probably mean I have to modify PHP itself or call certain
> extension function from within PHP script?
> (That is what I am desperately trying to avoid.)
Yeah, just wanted to share the idea so it can be proper evaluated which
way is the best :-)
> Again, thanks for all the help!
You're welcome.
johannes