CGI into HTML

I'm new to CGI...

$disclaimer_file = "disclaimer1.txt";

print "Content-type: text/html\n\n";
open(FILE,"$disclaimer_file");
while(<FILE>) {
   print $_;
}
exit;

How would I make an HTML file display this?
DARKSOULAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mattropeConnect With a Mentor Commented:
If your web server supports Server Side Includes (SSI), you can include the contents of a file in a web page with the following directive:

<!--#include file="filename.ext" -->

This sounds like what you were looking for...

0
 
mattropeCommented:
Assuming the contents of disclaimer1.txt is all you want to display in the web browser, simply copy the contents of disclaimer1.txt into an HTML file.
0
 
DARKSOULAuthor Commented:
No... I need that on more then 100 HTML files but I update that info all the time. Thats why I looked to a script-- so I just update that one text file and then it'll put it on every page.
0
 
DARKSOULAuthor Commented:
Very nice! Thanx-- (:
0
All Courses

From novice to tech pro — start learning today.