473,890 Members | 1,262 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to update website

114 New Member
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 3861
TheServant
1,168 Recognized Expert Top Contributor
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 Recognized Expert Moderator Expert
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 New Member
You can use iFrames :)
Mar 1 '09 #4
Markus
6,050 Recognized Expert Expert
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 Recognized Expert Expert
@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
3273
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 scripts working on a new server with the most recent version of PHP. I've pretty much taken care of all the various errors that were popping up. Most only pointed out out non-fatal undefined or assumed variables. I've been able to cure most of...
1
1618
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 and goes on. The user can post, read msg he can also update the msgs that he had
1
2247
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
5864
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 available at the website.... Any articles that would be a good place to start? One of the things I don't understand is how a program can stop itself to replace itself...
2
2268
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 to us a couple of months ago that some clients received application server errors at the moment we updated (if I remember correctly, they were sharing or process in use errrors). Since then, we've been paranoid about ensuring that there is no...
5
1300
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 web config, and paste then on the server. At c:\intepub\wwwroot\website. But now I get a runtime error when I go to that page. What is the best way to update a site after maiking modifications on the developer machine? TIA
9
1737
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 checked privileges for connecting account and that isn't an issue. Maybe it's my query: $editO = " UPDATE organization SET
4
2418
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 Submitted defaults to 1/1/00 if the cboSubmittedBox field is "No". Otherwise it is selected from a calendar. The Date Entered field defaults to the current date. There are 3 sets of criteria that need to be checked for the update or append to take place. ...
1
1240
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 website URL REMOVED and I use Lycos Web Builder to update it so I need a website where you can put on HTML scripts. I've been looking at 110mb.com as I have seen alot of good reviews for them but any help and ideas would be very much appreciated. ...
0
9820
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10462
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9630
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8016
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5849
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6041
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4676
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.