Re: Fatal error: Call to undefined function: get_def ined_vars()

From: Date: Fri, 26 Jan 2001 19:36:57 +0000
Subject: Re: Fatal error: Call to undefined function: get_def ined_vars()
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8@lists.php.net to get a copy of this message
Rats! Let me see if I can convince my hosting provider to upgrade. Vic -----Original Message----- From: Monte Ohrt [mailto:monte@ispi.net] Sent: Friday, January 26, 2001 2:33 PM To: Smarty@Lists.ispi.net Subject: [smarty] Re: Fatal error: Call to undefined function: get_defined_vars() Hi Victor, get_defined_vars() was added in PHP 4.0.4. So it looks like anytime you pass variables to an include file, you will need at least PHP 4.0.4 or later. Monte Victor Tolbert wrote: > > Hi, > > Maybe it's because the server I'm on is using 4.0.3pl1. I receive the > following error > I tried the second example in the QuickStart. > > Fatal error: Call to undefined function: get_defined_vars() in > /home/vtolbert/public_html/sample_code/Smarty/templates_c/index.tpl.php on > line 8 > > I've noticed that in my "./templates_c/" directory, the file > 'header.tpl' > does not exist. The file, 'header.tpl.php' does. > > Any clues? Files are listed below. > > Thanks, > > Vic > > index.tpl.php > ============== > 1. <?php > 2. function _include_3a71c67e6b6d3($file_name, $def_vars, $include_vars) > 3. { > 4. extract($def_vars); > 5. extract($include_vars); > 6. include "$file_name.php"; > 7. } > 8. _include_3a71c67e6b6d3("./templates_c/header.tpl", get_defined_vars(), > array('title' => "Home Page")); > 9. ?> > 10. > 11. Hello, <?php print $Name; ?>!<br> > > 12. <?php print $FirstName; ?>, <?php print $LastName; ?><br> > 13. <?php print $Address; ?>, <?php print $Zipcode; ?> > 14. <?php include "./templates_c/footer.tpl.php"; ?> > > header.tpl.php > =============== > 1. <HTML> > 2. <TITLE><?php print _smarty_mod_handler('smarty_mod_default', true, > $title, "no title"); ?></TITLE> > 3. <BODY> > > --- > You are currently subscribed to smarty as: monte@ispi.net > To unsubscribe send a blank email to $subst('Email.Unsub') -- Monte Ohrt <monte@ispi.net> http://www.ispi.net/ --- You are currently subscribed to smarty as: VTolbert@witness.com To unsubscribe send a blank email to $subst('Email.Unsub')

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