Re: Fw: Re: include_php path
| From: | Monte Ohrt | Date: | Fri, 28 Dec 2001 16:40:44 +0000 |
| Subject: | Re: Fw: Re: include_php path | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2414@lists.php.net to get a copy of this message | ||
I've confirmed, it doesn't work. We'll have get that fixed :-)
But in the meantime, you can use $trusted_dir:
index.php
---------
$smarty->trusted_dir =
"/home/admin/sites/ecommatrix/nigeria/modules/navigation/";
$smarty->display('index.tpl');
index.tpl
---------
{include_php file="page_top"}
Ron Dyck wrote:
>
> Hard coded it works fine:
> {include_php
> file=/home/admin/sites/ecommatrix/nigeria/modules/navigation/page_top}
> (In most of my includes I don't use extensions.)
>
> I'd expect the error message: "Failed opening
> '/$IncludePath/page_top'" to
> show the parsed path...no?
>
> ron
>
> >
> > > Ok, does this file exist on your server?
> > >
> > > /home/admin/sites/ecommatrix/nigeria/modules/navigation/page_top
> > >
> > > Maybe you are not including the file extention?
> > >
> > > {include_php file="$IncludePath/page_top.php"}
> > >
> > > Do you (or the web server user) have read access to this file/directory?
> > >
> > > Ron Dyck wrote:
> > > >
> > > > > It should look something like this:
> > > > >
> > > > > {include_php file="$IncludePath/foo.php"}
> > > >
> > > > OK, I must be missing something,
> > > >
> > > > I set this: $this->assign("IncludePath",
> > > > "/home/admin/sites/ecommatrix/nigeria/modules/navigation");
> > > >
> > > > and call it like so: {include_php file="$IncludePath/page_top"}
> > > >
> > > > to get this error: Warning: Failed opening '/$IncludePath/page_top'
> for
> > > > inclusion
> > > >
> > > > The variable is set properly as it echos correctly as: {$IncludePath}
> in
> > the
> > > > .tpl
> > > >
> > > > ron :~(
> > > >
> > > > ---
> > > > You are currently subscribed to smarty as: monte@ispi.net
> > > > To unsubscribe send a blank email to
> $subst('Email.Unsub')
> > > > Visit Smarty's homepage at
> > > > http://www.phpinsider.com/php/code/Smarty/
> > >
> > > --
> > > Monte Ohrt <monte@ispi.net>
> > > http://www.ispi.net/
> > >
> >
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at º
> ET4²6OW3½Ó±æ(http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/