Re: include_php path
| From: | Ron Dyck | Date: | Fri, 28 Dec 2001 15:55:42 +0000 |
| Subject: | Re: include_php path | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2407@lists.php.net to get a copy of this message | ||
Don't seem to have much success.
I assigned a path:
$this->assign("IncludePath", /home/admin/site/modules/navigation/");
And tried to use it in the include like: {include_php file={$IncludePath}}
I even tried to add it in the config file: application_root =
/home/admin/site/modules/navigation/
and then use {include_php file=#application_root#} without success.
Any ideas?
ron
> Yes, it should work just fine. You should be able to use an absolute
> path like "$path_var/include_file" where $path_var is an assigned
> template var, or make the path relative to $trusted_dir.
>
> Ron Dyck wrote:
> >
> > I'm using an absolute path in 'include_php' and I'd like to use a
constant
> > or variable to make it easier when uploading to live server with
different
> > path.
> >
> > The file is not in the web server document root but in a sub-directory
> > beside the document root.
> >
> > Is it possible to do something like: {include_php
> > file="$path_var/include_file"} Where $path_var is a global setting.
> >