RE: Fixing the path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----Original Message-----
From: Rico Secada [mailto:coolzone@xxxxx] 

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

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?

Rico.
--

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.

Cheers
Arno


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux