| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Includes Within An Include Problem | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() 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.
__________________
X-Cart: 4.0.18 Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2 |
|||||||||
#2
|
|||||||
|
|||||||
![]() |
|||||||
#3
|
|||||||||
|
|||||||||
![]() 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?
__________________
X-Cart: 4.0.18 Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2 |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() 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? ![]()
__________________
X-Cart: 4.0.18 Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|