Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-09-2012, 06:24 PM   PM User | #1
DSaidov
New to the CF scene

 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
DSaidov is an unknown quantity at this point
How to add a text in HTML written in other file.

Well guys. I've made a static HTML website with a lot of pages and I'm bored with adding the footer in everypage. So I decided that it will be easier and useful for me to learn how to (I've added:
Code:
Designed by <a href="url"><img src="url"></img></a>
in .html file 1 named footer.html)
So I would like to add a code (I don't know if it is possible), so I would like html page 1 to check the text written in html file 2 and show it in html page 1.
I hope you understood me.
I think that it is possible with PHP too, but I'm total PHP newbie and don't know how to add this code (html file 1) in a php page.

Thanks in advanced.
DSaidov is offline   Reply With Quote
Old 10-09-2012, 07:32 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,705
Thanks: 5
Thanked 876 Times in 851 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
You need a server side script and a server that supports it. The most popular and wide spread is PHP but for this task an alternative is Server Side Includes (SSI), too. Both scripts (Server Side Includes; PHP include()) are equally simple to apply and both require your main documents’ file extension to be changed to .sht, .shtm, or .shtml (for SSI), or .php (for PHP), respectively, in order for the server to know how to treat the include statements.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:51 AM.


Advertisement
Log in to turn off these ads.