![]() |
Includes Within An Include Problem
Has anyone ever ran into a problem when using the Smarty method for including a file {include file="../../includes/footer.inc"} when there are more PHP includes within the file that is being included? Because Smarty can't parse regular PHP, when I view a page's HTML I see the unparsed PHP code like <?php include("/directory/file2.php"); ?>. Just wondering if anyone had any way to get around this. I can't change all of my includes to smarty style because the code being included is used on many non-xcart pages.
|
|
I read the Smarty manual page for includes, but it doesn't really offer any means for getting around the problem I am having. I am still getting unparsed PHP code when I have an include within an include. Someone may suggest to not have an include within an include, but I need to, due to the structure of my static/non-Xcart pages. Has anyone ever come up with a work around for this?
|
|
I thought that might work because if I can parse regular PHP using code {php}{/php} tags, then I should be able to parse any additional PHP that comes along as a result of the first PHP code. For some reason though, I am getting the following message:
Fatal error: Cannot redeclare my_function() (previously declared in /directory/www/file.php:4) in /directory/www/file.php on line 4 . It seems to think I am redeclaring one of my own functions but I don't see how that can be. Any ideas? 8O |
All times are GMT -8. The time now is 10:26 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.