• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

SSI or an alternative

andy_jacko

New Member
I am fairly new to Web design(I can produce pages in dreamweaver and noptepad). As part of a college project we are required to design a website with a Flash Navbar which is to remain static. The best way to do this I thought would be with Frames, but whilst talking with a friend he suggested that an alternative would be to use SSI. The problem is I don't know how.
Is ssi the best option, what would you suggest.

coluld you tell me roughly how to do SSI or the location of a tutorial.

Any help would be appreciated.


p.s. I hope this is the right forum for this post
 
PHP is a lot better than SSI, you can use variables to determine the includes. :D

<?php include "path/to/file/to.include"; ?>
 
The next best thing about using PHP for includes is if the file doesn't exist, you can even print a 404 message! :D
 
PHP is a lot better than SSI, you can use variables to determine the includes.
Just a quick note, you can with SSI too. It's not as easy, but still perfectly possible.
 
Originally posted by Dusty
Just a quick note, you can with SSI too. It's not as easy, but still perfectly possible.
Using SSI with PHP/Perl/Python/Whatever? Not very practical... :p
 
Using SSI with PHP/Perl/Python/Whatever? Not very practical...
You can do it with just straight SSI :p. It just takes two SSI calls, one to get the query string and one to include the page (maybe a third if you've got more than one variable in the query string and you need to manipulate it).
 
Well, you can just use php's include and make it a lot easier for yourself. :rolleyes:
 
Well, yeah, if you're making the page from scratch you might as well use PHP, but if the situation were of an already existing SHTML page then there'd be no use in taking the time to change over to PHP when you don't need to. Here's a one-liner SSI call that would include whatever's in the page's query string:

<!--#include file="${QUERY_STRING}"-->

...or you could do something more complex like:

<!--#if expr="${QUERY_STRING} = /something/" -->
<!--#set var="page" value="something.txt" -->
<!--#elsif expr="${QUERY_STRING} = /somethingelse/" -->
<!--#set var="page" value="somethingelse.txt" -->
<!--#else -->
<!--#set var="page" value="default.txt" -->
<!--#endif -->
<!--#include file="$page"-->
 
???

Im still none the wiser as I said before I am a newbie and don't know how to use php/ssi so I was hoping for a tutorial explaining how to do what iwant.

perhaps I should stick with frames and buy a php book when I can afford one.
 
Dreamweaver and frames? What the hell are they teaching you in college?!

Anyway, what exactly is it that you want to do? Just include the navigational bar on every page? That's easy enough, make a document called something like nav.txt. In it put the HTML for the navigational bar. Now you have an option, either SSI or PHP.

If you take the SSI route, make sure that all of your pages end with ".shtml", instead of the regular ".html", and also insure that your host offers SSI. Now, on each page where you want the bar to show up, just type this:

<!--#include virtual="nav.txt"-->

That's it.

If you instead want to use PHP, make sure that all your pages end with ".php" and, like for SSI, make sure your host supports PHP. On each page where you want the bar to show up, type:

<?php include="nav.txt"; ?>

And that's it.
 
Thanx guys for the ssi code.

by the way I as said before that I am new to web design and taught myself HTML using Notepad. I am at college learning Flash and Dreamweaver(Better then using Notepad I suppose). You don't seem to like dreamweaver, what do you suggest instead.


p.s. I take what I can at the Moment I'm strapped for cash and we can't all be web design gurus (yet).
 
Originally posted by andy_jacko
by the way I as said before that I am new to web design and taught myself HTML using Notepad. I am at college learning Flash and Dreamweaver(Better then using Notepad I suppose). You don't seem to like dreamweaver, what do you suggest instead.

You have it all wrong. Dreamweaver sucks, notepad and the like (any text editor at all) are better than dreamweaver, plus you don't have to pay for their crappy software.
Originally posted by andy_jacko

p.s. I take what I can at the Moment I'm strapped for cash and we can't all be web design gurus (yet).
Take my advice. Don't use Dreamweaver and learn HTML 4. Save yourself some money.
 
thanks for the advice

I got Dreamweaver and Flash etc. on a student license
I know most of the code for HTML4 its the other bits I can't do at the moment Java etc.

Providing my tutor dosen't see this, I code all my sites in Notepad then run them through Dreamweaver so it can add it's extra
code to make it look like I used it.

What do you reccomend I learn to help with my aim of becoming a web designer.

p.s. do you like flash if not waht alternative do you suggest
 
Last edited:
For an editor, I recomend PHP Coder Pro ( www.phpide.de ), it has syntax highlighting for HTML and PHP + a build in PHP debugger.
BTW, Java s*cks.
 
Back
Top