Re: how to get document_root in extension
| From: | Wez Furlong | Date: | Wed, 09 Mar 2005 01:55:05 +0000 |
| Subject: | Re: how to get document_root in extension | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-15318@lists.php.net to get a copy of this message | ||
If apache is the only platform you're targeting, you can get at the
apache request structure like this:
request_rec *r;
r = ((request_rec *) SG(server_context));
If you're running under a different web server, you'll most likely
blow it up shortly after this point.
If you want a degree of platform independence, take a look at SAPI.h,
our server API abstraction layer.
--Wez.
On Tue, 08 Mar 2005 08:36:46 -0700, Daniel Simser
<daniel.simser@techmeridian.com> wrote:
> How does one retrieve the current "document_root" and/or other apache
> specific information from within an extension.
>
> I'm just starting to write an extension as a learning process now, but I
> have an extension that I would like to write, but need to learn first.
>
> Thank you for any help,
> Daniel
>
> --
> Daniel Simser <daniel.simser@techmeridian.com>
> TechMeridian, Inc.
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>