Jump to content
xisto Community
Saint_Michael

shtml does anyone still use it

Recommended Posts

How exactly do you format an HTML document so that it is shtml because my site is very standard at the moment and would like to add something in that is for shtml.

Share this post


Link to post
Share on other sites

How exactly do you format an HTML document so that it is shtml because my site is very standard at the moment and would like to add something in that is for shtml.

There is no need for any special formatting at all. Simply change the file extension from .html or .htm to .shtml or .shtm!
Then it will accept all the shtml formats...

That's easy isn't it?
Googlue!

Share this post


Link to post
Share on other sites

There is no need for any special formatting at all. Simply change the file extension from .html or .htm to .shtml or .shtm!Then it will accept all the shtml formats...

That's easy isn't it?
Googlue!

Supported. You follow exactly what googlue eplained to you. That will help you i guess.

Share this post


Link to post
Share on other sites

I use shtml to generate random facts on my front page. To do this:

1. Create a cgi-bin directory
2. Create a facts.txt file in the cgi-bin directory and put facts in there: 1 fact per line
3. Create a file named facts.cgi in notepad
4. In facts.cgi, copy and paste the following code:

#!/usr/bin/perl -wTuse strict;my $quote;open(QUOTES, "facts.txt") or die "Oops! Can't find quote file: $!";srand;rand($.) < 1 && ($quote = $_) while <QUOTES>;print "Content-type: text/html\n\n";print $quote;
5. Where ever you want the random fact to appear, copy and paste the following code to your page:
<!--#include virtual="cgi-bin/facts.cgi"-->
Change "cgi-bin/facts.cgi" (w/o quotes) to where ever you stored your facts.cgi file
6. Upload your cgi-bin directory to your web space
7. Chmod facts.cgi to 755
8. Remember to name the web page file that will display the random fact as blah.shtml where blah is any name you wish. shtml extension should stay.

Good luck!

Btw, should I have made that a separate topic/tutorial? If you admins think so, can you please move it for me? Thanks!

Share this post


Link to post
Share on other sites

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...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.