The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Include footer not working
HenryH
post Feb 1 2018, 07:30 AM
Post #1





Group: Members
Posts: 3
Joined: 1-February 18
Member No.: 26,582



New to all this so please be gentle with me !

Have created a simple .php file :

CODE
<?php
echo "<p>Copyright © 2016-" . date("Y") . " Some info?</p>";
?>


The intention being to create a uniform footer for each webpage.
On the HTML file for the webpage I have the line :-

CODE
<?php include 'footer.php';?>
(OR <?php include '/footer.php';?>)

I get NOTHING included on my webpage.
What an I doing that is wrong??

Any help much appreciated.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Christian J
post Feb 3 2018, 02:21 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



It's usually very simple: just create a textfile called ".htaccess" and add one line of text in it (exactly what may vary, so ask your web host), then upload it to your web root directory. But again, it's not necessary unless you really want it.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 06:16 AM