|
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 |
saitho Smarty n00b
Joined: 27 Jul 2015 Posts: 2
|
Posted: Mon Jul 27, 2015 8:05 am Post subject: include_php - missing variables from classes |
|
|
Hi,
I'm including filea.php using {include_php} into my template. This file however also includes config.php which requires a database class and establishes a connection to the database as $db.
The $db from config.php however is not passed over to filea.php, even though it should. Other variables work fine.
Do you have any suggestions on how to fix that problem?
Thanks |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Mon Jul 27, 2015 6:20 pm Post subject: |
|
|
Solution: Don't include PHP code into your templates. |
|
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
|