-----Original Message-----
From: Rico Secada [mailto:coolz...@it.dk] 

Some time ago I developed a small web application that a bunch of users has

I have always used the DOCUMENT_ROOT for my includes, but the other day I
installed the application in a subdirectory, and as you've guessed a lot of
the includes didn't work.

I have been reading up on the subject of absolute vs. relative paths etc.
And on the subject of defining your own document root.

I need the application to be as user friendly as possible, and I would like
to avoid having users enter path details in the configuration.

What is the best way to solve this problem?


Who are your users? Can users download the script and run it on their own
servers? If so there shouldn't be a problem asking them to set a path in a
config file because presumably the users would know something about servers
and paths, and presumably they'll know enough to create the directory and
copy the files there in the first place.

If you have an install process you can pick up the current directory from
system globals and write it to the path setting in the config file. You
might need two different absolute paths, one for includes and one for urls.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to