Re: include_php path

From: Date: Fri, 28 Dec 2001 16:07:41 +0000
Subject: Re: include_php path
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2408@lists.php.net to get a copy of this message
Ron Dyck wrote: > > 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}} It should look something like this: {include_php file="$IncludePath/foo.php"} btw, you never nest Smarty tags, it won't work. > > 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. > > > > > --- > 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/

« previous php.smarty.general (#2408) next »