perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Kassab <...@glin.com.mx>
Subject Re: pathname of current executing file relative to document root
Date Tue, 31 Dec 2002 01:36:47 GMT
Hi, maybe this resolve your problem.


[+ $ENV{'PATH_TRANSLATED'}+]

This env variable have the value you are looking for.

Well it resolve the problem i have to execute subs from different
directory trees.


[-

@keys = keys %ENV;
@values = values %ENV;

-]

[$ while (@keys) $]

[+pop(@keys)+]= [+pop(@values)+]<br>

[$ endwhile $]

<br><br>
[-
$the_page_path=substr($ENV{'PATH_TRANSLATED'},0,length($ENV{'PATH_TRANSLATED'})-6); -]

File being called: [+ $ENV{'PATH_TRANSLATED'}+]<br><br>
Page path: [+ the_page_path +]<br><br>


Carlos Kassab

El lun, 30-12-2002 a las 19:12, Kee Hinckley escribió:
> At 4:09 PM -0500 12/30/02, Kee Hinckley wrote:
> >Is there a clean way to get this in HTML::EmbperlObject, or should I just take
> >
> >$0->ReqFilename() and remove $ENV{DOCUMENT_ROOT}?
> 
> Actually, I take it back.  ReqFilename doesn't have the right name 
> either.  How do I get the name of the file currently being executed.
> -- 
> 
> Kee Hinckley - Somewhere.Com, LLC
> http://consulting.somewhere.com/
> 
> I'm not sure which upsets me more: that people are so unwilling to accept
> responsibility for their own actions, or that they are so eager to regulate
> everyone else's.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
-- 
Consultoría ERP BaaN Tools
Aplicaciones Internet/Intranet
http://www.glin.com.mx



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message