1. It better be clear what the current working directory is, if you are
going to depend on it.
2. What it is depends upon whether chdir is supported in your Apache
platform, IIRC.

Note that I am using 1.x still, so Execute is, in fact, part of
HTML::Embperl.  Also note that my real code uses chdir; this is merely
an example that doesn't.

  [- $dir = '/usr/local/WWW.codepages';
     $subpage = ${$rec}{type} . '.epl';
     if (! -f "$dir/$subpage") {
         $subpage = 'default.epl';
     } -]
  [- HTML::Embperl::Execute({ inputfile => "$dir/$subpage",
                            escmode => 0 }); -]

Ed

On Fri, 26 Sep 2003, Cameron B. Prince wrote:

> Hi,
>
> Does anyone have an example of a way to do a file existence test before
> executing a file to include? It's not clear to me what the current working
> directory is.
>
> Thanks,
> Cameron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to