473,323 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Best way to update website

114 100+
Hi Friends,

I have two HTML websites and I am regularly making lots of changes in one of them. Now I want the 2nd website should be updated automatically so that I don't need to update the website twice.

Here are two websites:

http://www.example.com

and

http://www.php.net

The only difference in both websites is the header and footer. Rest everything is the same.

I want that when I make any changes in example.com, it should automatically updated in php.net but I need to keep header and footer different for both the websites. The rest of the content should be the same for both websites.

Please help me on this and advise how can I do this?

Thanks

Deepak
Feb 20 '09 #1
5 3816
TheServant
1,168 Expert 1GB
Well you could just have two footer/header files and store them each in their own website folder and basically just have all your content in one file (and your headers/footers in separate ones) and then include all the files like this:
For webiste 1:
Expand|Select|Wrap|Line Numbers
  1. include( 'header.php');
  2. include( 'content.php');
  3. include( 'footer.php');
For webiste 2:
Expand|Select|Wrap|Line Numbers
  1. include( 'header.php');
  2. include( '../website_1/content.php');
  3. include( 'footer.php');
This is assuming your websites are on the same server and in the same folder (eg public_html). So each website calls the header.php and footer.php in it's own directory, but both websites call the content of website 1. I hope that made sense.
Feb 20 '09 #2
Dormilich
8,658 Expert Mod 8TB
if you have both domains on different servers you may as well use an ftp client that is able to sync folders. though it's not done automaticly it's just 2 or 3 clicks.
Feb 20 '09 #3
roccos
12
You can use iFrames :)
Mar 1 '09 #4
Markus
6,050 Expert 4TB
Or, I'm just throwing it out there, you could try using a database and take the pain of having to edit files directly away? That makes the most sense.

Expand|Select|Wrap|Line Numbers
  1. $page->get_header();
  2.  
  3. $page->get_content();
  4.  
  5. $page->get_footer();
  6.  
$page->get_content would make a request to your database (perhaps through a model) for the content, preparing it for display.
Mar 1 '09 #5
Markus
6,050 Expert 4TB
@roccos
iframes are bad. Go the server route.
Mar 1 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old...
1
by: Jaunty Edward | last post by:
HI, I have to write secure update record php script, here are the complete details of the website, the website has a login system that authenticates the user, writes the session ID for username...
1
by: revolnip | last post by:
As attached is the code : <% Option Explicit dim lngTimer lngTimer = Timer %> <!--#include file="Connect.asp" --> <!--#include file="Settings.asp" --> <!--#include file="Common.asp" -->
6
by: S.Sigal | last post by:
Hello: Always wanted to do this -- but never knew how... The goal is to write software that goes out to clients -- but I want to be able to auto-update them when there is a later release...
2
by: Stephen Brown | last post by:
We've been using dotNet for a couple of years now and have been updating our live server by just overwriting (Explorer drag and drop) the aspx and assembly files until we had some errors reported...
5
by: Rudy | last post by:
Hello! I currently have a site online. I added more features to my datagrid page, so users can update and stuff. I though I could just copy the aspx, aspx.vb and the server page including the...
9
by: Jeff Gardner | last post by:
Greetings: I have an UPDATE query (php 5.1.6/mysql 5.0.24a on apache 2.2) that appears to execute with no errors (php,mysql, or apache) but the data in the "UPDATED" table doesn't change. I've...
4
by: dougmeece | last post by:
Morning Everyone... I have a table that needs to be append to and also updated. All the fields in the table are populated with data from the text boxes and combo boxes on a form. The Date...
1
by: Faybe1989 | last post by:
Heya, Im looking for a new free website provder and host as I currently have a Lycos Tripod website and as Lycos are closing all there accounts I need a new one. My website is only a litle fan...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.