Re: SCRIPT_FILENAME Environment variable set wongly?

[prev] [thread] [next] [Date index for 2004/12/15]

From: Stas Bekman
Subject: Re: SCRIPT_FILENAME Environment variable set wongly?
Date: 19:53 on 15 Dec 2004
colin_e wrote:
[...]
> What i'm unclear on is the output line from the script-
> 
>          'SCRIPT_FILENAME' => 'I:/WWW/public/testapp',
> 
> This is the publicly-visible URL of my script. Fine, but does the 
> environment
> give me any way to find the physical location of my script (i.e.
> 'I:/WWW/private/lib/testapp/main.pm'), or at least it's basename component?

The physical location of the file is simple, just: __FILE__

To do all kind of uri/filename manips refer to the following manpages:
http://perl.apache.org/docs/2.0/api/Apache/URI.html
http://perl.apache.org/docs/2.0/api/APR/URI.html

> I need this to be able to construct physical pathnames within the script 
> to access
> resource files such as HTML templates.



        -- 
        __________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

Re: <Perl>...</Perl> and startup.pl equivalent?
Martin Moss 14:51 on 13 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 23:41 on 13 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 23:53 on 13 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 00:29 on 14 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 16:54 on 13 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 23:31 on 13 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Philippe M. Chiasson 23:42 on 13 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 00:27 on 14 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Philippe M. Chiasson 21:12 on 14 Dec 2004

Re: <Perl>...</Perl> and startup.pl equivalent?
Stas Bekman 23:53 on 14 Dec 2004

Re: SCRIPT_FILENAME Environment variable set wongly?
Stas Bekman 19:53 on 15 Dec 2004

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52