cbeaudry Posted March 17, 2005 Share Posted March 17, 2005 I'm having a problem wrapping the cart within the overall look of my site. I can cut and paste the code of my header and footer files but would much rather call an include at the appropriate places in the cart. That way, if a future global change is made, I won't have to tinker with the cart files. Problem is that I get an error when using either include or require_once and putting the filename in there. The page returns an error saying: Warning: main(/includes/breadcrumb.php) [function.main]: failed to open stream: No such file or directory in /usr/local/apache/sites/website.com/beta/store/includes/header.php on line 167 Warning: main() [function.include]: Failed opening '/includes/breadcrumb.php' for inclusion (include_path='.:/usr/local/lib/php') in /usr/local/apache/sites/website.com/beta/store/includes/header.php on line 167 As I said, I'd prefer not to put the whole chunk of code in the cart's header and footer files. If I could just have a simple include for the whole site's header and footer, that would be my preference. Any ideas how to do this? Link to comment Share on other sites More sharing options...
OceanRanch Posted March 17, 2005 Share Posted March 17, 2005 Try adding this to the end of your footer.php file and place your file in the includes directory /usr/local/apache/sites/website.com/beta/store/includes <?php include("filename.php") ?> HTH Tom Link to comment Share on other sites More sharing options...
cbeaudry Posted March 17, 2005 Author Share Posted March 17, 2005 I got it to work by adding the entire path to the header and footer files. That way, I only have to update the two files at the site root for the entire site to change instead of duplicating changes for the site and then the cart separately. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.