|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
GeXus Smarty Rookie
Joined: 16 Aug 2006 Posts: 28
|
Posted: Sat Apr 28, 2007 4:00 am Post subject: Including PHP fatal error |
|
|
I'm including a php file (inside a template) that is displaying a template. I am using include_once and making sure that smarty is not set twice. But no matter what I keep getting
Fatal error: Call to a member function assign() on a non-object
Any ideas why I would get this? Why would smarty not be initialized? If I go to the included php file directly, it works fine.. just not as an include.
Thanks for you help! |
|
Back to top |
|
czarnowski Guest
|
Posted: Sun Apr 29, 2007 11:34 am Post subject: |
|
|
You should do this:
{include_php file='test.php' assign='testvar'}
the output of test.php was captured in testvar, and than ypu can use $testvar. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|