NamePros.Com (http://www.namepros.com/)
-   Programming (http://www.namepros.com/programming/)
-   -   INCLUDES w/o PHP? (http://www.namepros.com/programming/15850-includes-w-o-php.html)

NetButch 12-19-2003 12:06 PM

INCLUDES w/o PHP?
 
I am wondering if I can do a similar function to the PHP Include() function by using only HTML/DHTML/XML...

I want to make changing text really easy by using .txt files for the text and formating everything with CSS... the server does not support PHP or ASP and it will not ever.. so I need to find a way to do this without anything except the basic languages.. even JavaScript would be okay..

thanks in adavnce.

Butch

deadserious 12-19-2003 12:22 PM

You can try something like this for use with Internet Explorer:

<object type="text/x-scriptlet" width="100" height="100" data="file.txt"></object>

Or if your server supports Server Side Includes you could do it that way. You can check if it supports SSI by adding something like:
<!--#echo var="DATE_LOCAL" -->
to a .shtml page and see if it displays the time. Then if SSI is enabled you can include files with the include directive:
<!--#include file="file.txt" -->

Jeanco 12-27-2003 10:37 PM

yup, and can you set your .htaccess file so you don't even need to rename from .HTML - you can set it so that the webserver parses HTML like it would SHTML.

Google is your friend :D

tres 12-28-2003 11:39 AM

This is a late reply but for the benefit of others, http://httpd.apache.org/docs/mod/mo...e.html#xbithack

If you run apache, you can mark a file to parsed by the server by making it executable, i.e.. o+x from the command line or use your ftp client.

Jamie_net 12-30-2003 08:57 PM

This shows how to with SSI at the bottom of the page.

http://www.xentrik.net/scripts/include.php

jj2ii3344 12-31-2003 10:37 AM

Very nice info guys! Thanks!


All times are GMT -7. The time now is 01:00 AM.
Site Sponsors
Advertise your business at NamePros

Powered by: vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0