Date: 05/12/00
- Next message: Etienne Sevin: "Re: [phplib] a good tutorial"
- Previous message: Fernando Caamaño: "[phplib] a good tutorial"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
MAD> I've created one instance of the Template class ($tpl), and tried to use it
MAD> from within other class (In my case, Cart). Template called in that
MAD> class functions (global $tpl), and then all the procedures called in
MAD> the right order (set_file, set_var, parse ..). The problem is the
MAD> first call to the Template from within a class function works fine,
MAD> the second (I suspect not only the second, but others except the first
MAD> also) , from another function, dies with a "not a valid handle" error, where a variable handle
MAD> in a template mentioned. It seems to me that the second set_file
MAD> worked bad .. Has someone experienced such a problem, an how to
MAD> resolve?
when I create a new instance of the Template class in each function
where I use it, instead of globallizing the one instance everywhere,
the problem does not appear. But it seems to me not
the efficient way. If it is the only solution, should i destruct the
instance (unset($tpl)) in the end of the function each time for better
efficiency?
-- Best regards, Max A. Derkachev--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Etienne Sevin: "Re: [phplib] a good tutorial"
- Previous message: Fernando Caamaño: "[phplib] a good tutorial"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

