Re: globals off in function
| From: | Foong | Date: | Tue, 14 Jan 2003 18:28:28 +0000 |
| Subject: | Re: globals off in function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131601@lists.php.net to get a copy of this message | ||
instead of:
global $smarty;
$smarty]->assign("message", $message);
try:
$_GLOBAL['smarty']->assign("message", $message);
Foong
Michael Bevz <info@mixa.kiev.ua> wrote in message
news:20030114114614.88132.qmail@pb1.pair.com...
> Hi, all!!!
> I've such trouble:
> ( register_globals = off )
>
> in function i call to $smarty variable
> "
> function showLoginForm(){
>
> global $db, $smarty; // $smarty = new Smarty in main code
>
> $smarty->assign("message", $message); // !!!!
> "
> and i receive this error message
> "
> Fatal error: Call to a member function on a non-object in
> /usr/home/elastic.org/work/svyatoshin/system/common_func.php on line 22
> "
>
> Imho, globals don't working with "globals off", nut i can't find this in
> manual.
>
> Who can help me?
>
>