Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 PHP auto year update code
Author « Topic »  

1818charlie
ECT Moderator

United Kingdom
1198 Posts

Posted - 03/14/2021 :  09:33:26  
The following code always auto updates the year in the footer for where the copyright shows. That code is usually placed in the foot of the .dwt file thus all pages are showing the same. © 2012 -<?php echo date("Y"); ?>

Recently I've been working on a new site and I'm making most of the page contents into content regions & it's working well. But when I place the footer stuff in a content region everything is spot-on apart from the auto copyright update, it does nothing only showing the © 2012 -.

This is also the same if I create a php include file for the footer - eg: footer.php. If I create a footer.txt include the code works fine.

Any ideas as to how, or if, this can be solved?

Steve
Egerton Village, Bolton, UK

Marshall
Ecommerce Template Guru

USA
1916 Posts

Posted - 03/14/2021 :  11:22:14  
<?php echo date("Y"); ?> will not work in content regions. No PHP coding will as, in effect, you are putting PHP code inside PHP code.

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

1818charlie
ECT Moderator

United Kingdom
1198 Posts

Posted - 03/14/2021 :  16:51:24  
Hi Marshall

I had an idea that may be the case.

Cheers!

Steve
Egerton Village, Bolton, UK

insight
ECT Moderator

USA
4479 Posts

Posted - 03/14/2021 :  17:06:46  
Having it in some sort of footer.php file that's then included in all the site pages will work though. That's what I do. In fact, I'd say it was better because you don't really want clients roaming around in your footer code, as they might do if it was a content area.

Peter


Professional ecommerce web hosting services
Shared hosting Windows & Linux | Dedicated servers | Domains | SSL
Ecommerce Templates specialists since 2003
https://servelink.com
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000