Re: Simulating require_once within an extension
| From: | Mo McRoberts | Date: | Sat, 24 Feb 2007 22:03:53 +0000 |
| Subject: | Re: Simulating require_once within an extension | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-28129@lists.php.net to get a copy of this message | ||
Hi Jochem,
On 24-Feb-2007, at 19:09, Jochem Maas wrote:
I suspect you could implement the desired functionality using http://php.net/manual/en/function.stream-wrapper-register.php although I can't find any info on whether include/require actually work with registered stream wrappers .. maybe one of the devs could confirm/deny whether this is possible. which would allow you to do something like this (assuming it is possible to do): require_once 'momcr://foo/script.php';That's a good idea, but unfortunately won't work for me--the ‘require’ step is the first part of the function, which will then go on to do other things (the return value from the function will end up being a class instance—and it will be irrespective of whether the includee had previously been included or not); it's just the case that this is as far as I've got with C implementation of it before running into problems! Mo.