You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Adam Sussman <my...@vidya.com> on 1996/06/15 07:08:22 UTC
document_root function
The document_root function in http_core.c has comments that say not to use it.
Is there any reason for this, or an alternative to this function?
What is the best way to get at this information?
-adam
Re: document_root function
Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Fri, 14 Jun 1996, Adam Sussman wrote:
> The document_root function in http_core.c has comments that say not to use it.
> Is there any reason for this, or an alternative to this function?
Neat as I can tell, the reason not to use docuemnt_root() is not
because of the function itself, but how it's used. The comment in
http_core.h is more descriptive than the one in http_core.c. Namely:
char *document_root (request_rec *); /* Don't use this! If your request went
* through a Userdir, or something like
* that, it'll screw you. But it's
* back-compatible...
*/
Or, in other words, don't make the mistake of thinking that document
root + uri gets you the filename. But I think it's safe to use if you
really do want the document root, for whatever reason.
--
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us> The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/