Re: [SMARTY] all vars
| From: | Sheldon Jones - Admin | Date: | Mon, 08 Jul 2002 22:44:20 +0000 |
| Subject: | Re: [SMARTY] all vars | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5233@lists.php.net to get a copy of this message | ||
sorry the function call should be
var_email($my_var, "your_email_address@your_domain");
--Sheldon
On Mon, Jul 08, 2002 at 04:41:40PM -0600, Sheldon Jones - Admin wrote:
> A trick to make var_dump friendly.
>
> function var_email($var, $address) {
> ob_start();
> var_dump($var);
> $body = ob_get_contents();
> ob_end_clean();
> mail($address, "php var_dump", $body);
> }
>
> var_email($tpl_vars, "tpl_vars", "your_email_address@your_domain");
>
> I somethimes find it nice to send a var_dump to my email so I don't write the
> output to a running site.
>
> --Sheldon
>
> On Mon, Jul 08, 2002 at 05:16:34PM +0100, Jonathan Chum wrote:
> > I hadn't thought of that. I was planning to write a technical document about
> > all the variables used a shopping cart application I wrote and was actually
> > going to go through each SQL query to see what I passed into the template.
> > However, I could put this as a debug feature to turn on what variables a
> > designer can use. Boy oh boy. . .
> >
> > The Smarty docs are already a great reference :) Everyday I'm learning new
> > tricks with Smarty.
> >
> > Regards,
> > Jonathan Chum
> > Systems Developer
> >
> > -----Original Message-----
> > From: Monte Ohrt [mailto:monte@ispi.net]
> > Sent: Monday, July 08, 2002 9:16 PM
> > To: oscar@el-mundo.net
> > Cc: Mattia; smarty-general@lists.php.net
> > Subject: Re: [SMARTY] all vars
> >
> >
> > That will work too, I was thinking from the viewpoint of a template
> > designer dumping out the available vars.
> >
> > Oscar Fernandez Sierra wrote:
> > > Monte Ohrt wrote:
> > >
> > >>The debug console shows you that.
> > >>
> > >>Mattia wrote:
> > >>
> > >>>Is there an instruction to get all vars assigned to a template?
> > >>>
> > >>>tia
> > >>>
> > >>>
> > >>>
> > >>
> > >
> > > Sometimes it is good a look at the documentation:
> > >
> > > get template vars
> > >
> > > This gets an array of the currently assigned template vars.
> > >
> > > array get_template_vars();
> > >
> > > Example 4-23. get template vars
> > > // get all assigned template vars
> > > $tpl_vars = $smarty->get_template_vars();
> > > // take a look at them
> > > var_dump($tpl_vars);
> > >
> > >
> >
> >
> >
> > --
> > Monte Ohrt <monte@ispi.net>
> > Director of Technology, ispi Inc.
> >
> >
> > --
> > Smarty General Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
> > --
> > Smarty General Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> --Sheldon
>
> ------------------------------------------------------
> Sheldon Jones
> Systems Administrator
> Lobo Internet Services, Ltd.
>
> mailto:sheldon@hobbydump.com
>
> Does Microsoft mean "small and limp"?
> What's with the 'Intel Inside' warning label anyway?
> ------------------------------------------------------
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
--Sheldon
------------------------------------------------------
Sheldon Jones
Systems Administrator
Lobo Internet Services, Ltd.
mailto:sheldon@hobbydump.com
Does Microsoft mean "small and limp"?
What's with the 'Intel Inside' warning label anyway?
------------------------------------------------------