Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Inserting a text file into a page

Posted on 1997-06-28
1
Medium Priority
?
214 Views
Last Modified: 2013-12-25
I want to insert a text file into a web page.  The file contents will change weekly but the title will remain the same.  How can this be done without using cut and paste ?
0
Comment
Question by:quopin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
julio011597 earned 300 total points
ID: 1854374
It may be done with Server Side Includes (SSI), or Common Gateway Interface (CGI).

SSI lets you write something like:

<!--#include virtual="/a_path/" file="included.txt" -->

where the virtual tag tells the server that the directory alias 'a_path' should be suffixed to the document root.
I'm afraid i don't know wether this method may have caching problems.

How to set up and enable SSI depends upon the particular web server you are on.

Second option is, of course, CGI: a CGI script lets you send on the fly whatever you need to be the page.

Rgds, julio
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to dynamically set the form action using jQuery.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question