perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <per...@elem.com>
Subject Re: Question about open()
Date Thu, 07 Feb 2008 20:45:23 GMT
On Feb 6, 2008 10:06 PM, Mag Gam <magawake@gmail.com> wrote:
> Currently, when I open a file I have to use the
> absolute  path (/var/www/appname/top.inc). Is it possible for me to use just
> 'top.inc'?

You can either use DocumentRoot
(http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_document_root_)
or use ModPerl::RegistryPreFork which will chdir to the directory your
script is in just like a normal CGI script does.  That would let you
use files relative to the script.

- Perrin

Mime
View raw message