Free Scripts
 
Banner Ads
Chat
Form Processor
GuestBook
MailFile
PostCard
 
Free Snippets
 
Cookies
Header/Footer
Random Text
Text Counter
 
Scripts Directory
 
ASP
ASP.NET
Java
Javascript
Perl
PHP
Python
XML
 
Misc.
 
Add Listing
Contact Us
Certifications
 
 
 

Description

This script is created for you to be able to include 1 file in another file. The most common use for this script is to serve as a Header/Footer. This will include an entire file with just 1 simple command. NOTE: if you are trying to include a file in HTML you must have SSI enabled on your server. Most servers today have php installed for free so if you need this functionality, consider switching to another language.

Include in PHP

Just include the following code where you want to include a file in a .php file.
<? include "file.html" ?>

Include in ASP

Just include the following code where you want to include a file in a .asp file.
<!-- #include file="file.html" -->

Include in CGI

To include a file in a .cgi or .pl page, use the following code.
#!/usr/local/bin/perl

$footer_file = "/path/to/footer.txt";

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



Copyright © 1996 - 2014 Free Scripts
Read our Privacy Statement
Read our License Agreement