RE: [SMARTY] Variables and include

From: Date: Sun, 11 Aug 2002 05:51:59 +0000
Subject: RE: [SMARTY] Variables and include
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5646@lists.php.net to get a copy of this message
Hi! I'm new to Smarty, but if my logic works, then it should be simple. Every php file (also those that were included) has access to global variables. You could most probably just use $_GET to get to variables that were part of URL. I guess you know how to use this array. Similarly you could probably make a global var in your main php file with "parameters", then access this global var in included file just if it would be on same context (or if using functions using "global $my_global_var". As I said... i'm new user of Smarty, so I could be wrong, but I just guess it should work this way (actually I can't imagine some limitations with included files). Regards, Bostjan > -----Original Message----- > From: David Kettler [mailto:davek@SDF.LONESTAR.ORG] > Sent: Sunday, August 11, 2002 1:24 AM > To: smarty-general@lists.php.net > Subject: [SMARTY] Variables and include > > > Hey, > > Is it possible to pass a variable to some php code that has > been included inside a template with include_php? If not, > how would I give my bit of included php access to a variable > that is part of the URL? Thanks. > > -- > Dave Kettler > davek@sdf.lonestar.org > http://davek.freeshell.org > SDF Public Access UNIX System - http://sdf.lonestar.org > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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