Re: [SMARTY] Re: passing a parameter to {include_php }

From: Date: Wed, 13 Aug 2003 07:29:09 +0000
Subject: Re: [SMARTY] Re: passing a parameter to {include_php }
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-10046@lists.php.net to get a copy of this message
On Tue, Aug 12, 2003 at 10:46:09PM -0400, Greg Beaver wrote: > Hi Ryan, > > Try a hack, use > > {php} > $_GET['viewStats'] = $this->get_template_vars('viewStats'); > {/php} > {include_php file="myfile.php"} > > :) no "real" need to hack: {include_php file="myfile.php" viewStats=$viewStats} is the way to do it. unfortunately it seems that ryan found a bug in 2.6.0-RC1 where the above doesn't work (but should). it works great with 2.5.0, though. greetings messju > Greg > > Ryan Allen wrote: > > > > > >I've got some code that I want to do something like a post to a .php > >file and include it in the middle of a script: > > > > > > > > > > > >{include_php file="myfile.php"} > > > > > > > >but what I really need it do is something like: > > > > > > > >{include_php file="myfile.php?viewStats=$viewStats"} > > > > > > > >It's in the middle of my template. Any suggestions?? > > > > > > > >Thanks! > > > > > > > >-- Ryan > > > > > > > > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

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