On Fri, 2003-08-01 at 15:46, Jean-Sebastien Guay wrote:
> I see only disadvantages to having to specify absolute paths in both
> these cases. For one, I have another web server running on port 8080,
> which I use to test my scripts on, and whose DocumentRoot is
> D:/htdocs-dev. So if I had to manually change the paths each time I
> copied files over from the development DocumentRoot to the production
> one, I would go crazy.

There are dozens of possible answers to this.  I typically put things
relative to the web server root, which is described here:
http://perl.apache.org/docs/1.0/api/Apache.html#Apache_E_gt_server_root_relative____relative_path___

Another approach would be to look up the directory that your script is
in and either chdir to that or pass it to your modules and have them use
it.

There are also common approaches like passing some kind of application
root either in an environment variable or in httpd.conf with a
PerlSetVar.

- Perrin

Reply via email to