Jump to content

Recommended Posts

Posted

This is probably a really basic thing to do, but is beyond me at the moment! I am putting together a standardised Home Page for the school, Firefox stylee, and want to have text on there taken from a .txt file which will also be kept on the server, but accessible by the Head/secretary etc for dates, messages etc.

 

The trouble I'm having is I don't know how to get the .html code to go to a text file and read it. Any suggestions/ideas?

Posted

You can't do it directly with html, but you can with some form of language - either client or server side.

 

Personally I would say the easiest way would be to use shtml. http://httpd.apache.org/docs/1.3/howto/ssi.html

 

Or you could use php, and the include tag: http://uk.php.net/include/

 

Or in javascript like this: http://www.netmechanic.com/news/vol4/javascript_no9.htm

 

Or, if you're feeling evil, you could use an iframe to do it: http://www.w3schools.com/tags/tag_iframe.asp

  • Thanks 1
Posted (edited)

To extend on what localzuk has said. If you're using Apache as your webserver then a nice PHP include is what I'd use.

 

If you're using IIS and don't want to switch to Apache or install PHP for IIS then you could use the SSI method that localzuk has linked to within IIS. A bit of googling will tell you how to enable shtml and SSIs within IIS.

Edited by Joedetic
Posted

Maybe its overkill but have you looked at the EduGeek Joomla! package? this is a full featured site in one package ready to deploy on a web server.

 

search here for it, its pretty smart.

Posted

It certainly seems like the direction the school is heading, and I know Joomla is quite effective as an intranet device.

 

Thanks for all the ideas folks. I will attempt them in order!

Posted (edited)

If you have PHP:

 

<?php

readfile("somedoc.txt");

?>

 

If you want to do this in STRAIGHT HTML (no serverside stuff needed) you could use regular frames:

 

 

or for the uber hack: rename the .txt to .htm!!

 

or, you MIGHT just be asking for a simple thing like how to link to other documents rather than show the document on a .htm, to do this you just use a hyperlink like so:

 

Some Description Here

Edited by Friez

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...