Header and footer codes?

zkiller

Super Moderator
Staff member
the file extension is more or less irrelevant. inc, txt, htm - makes no difference.

your indexes.shtm won't work because it's an incomplete file. your first tag is a body tag. the browser is therefor recognizing it as a plain text file and displaying it's contents as such.

are you using dreamweaver or a plain text editor to do your coding?

anyways, try adding the following to the beginning of your indexes file...

Code:
<html>
<head>
<title>Your Pages Title goes here!</title>
</head>
hope that solves your problem.
 

zkiller

Super Moderator
Staff member
also, looking at your include files, i got a few pointers for you.

1. don't include any head, title, html or meta tags in your includes. included files should only include content that belongs between your body tags. when they are included into your main file, they will become one with it and thus any such tags would be redundant and can cause problems.

2. i suggest putting all of your css styles into a separate file and include it into the page. makes for much cleaner code and again, keeps you from having redundant code which can cause problems. css would be included just under your </head> tag.

those are the two main things i noticed while just glancing over your top.inc file.

i'll see if i can't get a very basic example up for ya. it might help up clear up some things when you see it. :)
 

Recoil

New Member
hi there,

php includes are fairly easy (if i remember the syntax correctly)

<?php include("filename.html"); ?>

put that line of code in your main page wherever you want.

The only thing with php includes is that you will need to rename any page that uses them from a .html to .php
(the included pages can be still be .html provided it doesn't use any other php)

i hope this helps (and makes sense)

:)
 

zkiller

Super Moderator
Staff member
php appears to be installed on the server, but URL file-access is disabled appears to disabled, thus, includes won't work in php. i wonder if your problem all along has been that SSI is disables on the server as well.

might be time to have a little chat with your host. ;)
 

Recoil

New Member
Yes, you will need a host that has PHP installed i'm afraid.
The file willnot open on your computer unless you have PHP installed (hence why it is opening in dreamweaver - as that is the associated program for PHP files on your PC)
 

kiko_friendly

New Member
It's installed. I just need to put the files in the cgi-bin folder instead of www

o_O

Did you know that?

I didn't! Haha.

Oh well. I will experiment later.

Also, do I need to install PHP on my PC?
 

Recoil

New Member
you would only need to install PHP on your PC if you want to develop and view your files locally.
otherwise if you wanted to view any php files you would need to upload them to your server
 

zkiller

Super Moderator
Staff member
you would only need to install PHP on your PC if you want to develop and view your files locally.
otherwise if you wanted to view any php files you would need to upload them to your server
in order to view them locally you would need to setup a web server (either IIS which comes with XP Pro and XP MCE or apache) first. then install php. php files as default should be viewable anywhere within the site. they should not be limited to your cgi-bin folder.

i didn't know you had your own server. i figured you were on shared hosting like the majority of us.
 

zkiller

Super Moderator
Staff member
i get an internal server error. i quote: "Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error."

as i suggest in an earlier post, contact your host, as their obviously is something wrong. either make sure they have SSI enabled (shtml) or that php is installed and properly configured.

but again, php should not be limited to your cgi-bin.

404 page not found...
 

zkiller

Super Moderator
Staff member
I'm on a shared server, though...
sorry, from your post above i was under the impression that you installed php on your server personally. in a shared hosting environment you do not have full admin access and can not install software on the physical server.
 
Top