Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

Switched from FrontPage to Dreamweaver- Includes didn't work

michaelgs
Posts: 4
Joined: 14 Jun 07
Trust:

Switched from FrontPage to Dreamweaver- Includes didn't work

Help,
I am switching two sites from Front Page to Dreamweaver. The conversion went smooth but my Includes did not work.
I read up on this on Dreamweaver and believed I did it right.
Wrong.
On my WYSIWYG page all includes are as they should be. I uploaded the files to my server. But when I go on the internet none of my includes show up.
I looked at the sourcecode and the includes are there.
Can anyone, please, look at this and get me back to sanity?
The site is "http://www.freelancersjobexchange.com"
  • 0
Last edited by sydney on 03 Jun 10 3:51 am, edited 1 time in total.
Reason: link not found
 

PremiumMember
chatyak86
Posts: 1369
Joined: 17 Jun 06
Trust:
We aren't able to see an include since it runs server side and shows up as code... I didn't see any errors on the page so that means something must be working. Although I do see some comment tags for where the include should go. Also, you don't need this line of code in the head of your page.

<meta name="verify-v1" content="cYQwxmsPPfgLfaQrDurosQR2CUq/QDiZo241LLXQyQc=" />

So remove that one.
  • 0
michaelgs
Posts: 4
Joined: 14 Jun 07
Trust:
Thank you,
This line <meta name="verify-v1" content="cYQwxmsPPfgLfaQrDurosQR2CUq/QDiZo241LLXQyQc=" />
is required by google for site verification when I add a sitemap.
Here is the top part of the dream weaver code for two of the includes. Maybe that helps.
There are a total of four includes on every page, top, bottom,left and right. That way I only need to change new content in the center.

<body bgcolor="#FFFFFF">
<table width="1000" border="0" align="center" id="table1">
<tr>
<td colspan="3">
<!--#include virtual="Includes/Top-Include.shtm" --></td>
</tr>
<tr>
<td width="215" valign="top"><!--#include virtual="Includes/Left-Include.shtm" -->
</td>
<td width="570">
<p>
<H1 align="justify"><font color="#cc0000"face="Arial"> <a name="top of page" target="_blank"></a>Want to work at home? Discover how you can easily launch your own freelance home business today, and start earning.</font></H1>
<p class="TEX" align="center"><font color="#cc0000"><strong> <font size="4">well over</font>
  • 0
PremiumMember
chatyak86
Posts: 1369
Joined: 17 Jun 06
Trust:
michaelgs wrote:Thank you,
This line <meta name="verify-v1" content="cYQwxmsPPfgLfaQrDurosQR2CUq/QDiZo241LLXQyQc=" />
is required by google for site verification when I add a sitemap.
Here is the top part of the dream weaver code for two of the includes. Maybe that helps.
There are a total of four includes on every page, top, bottom,left and right. That way I only need to change new content in the center.

<body bgcolor="#FFFFFF">
<table width="1000" border="0" align="center" id="table1">
<tr>
<td colspan="3">
<!--#include virtual="Includes/Top-Include.shtm" --></td>
</tr>
<tr>
<td width="215" valign="top"><!--#include virtual="Includes/Left-Include.shtm" -->
</td>
<td width="570">
<p>
<H1 align="justify"><font color="#cc0000"face="Arial"> <a name="top of page" target="_blank"></a>Want to work at home? Discover how you can easily launch your own freelance home business today, and start earning.</font></H1>
<p class="TEX" align="center"><font color="#cc0000"><strong> <font size="4">well over</font>


The way you have that setup there, is not going to show code... when you <!-- PUT WORDS INSIDE OF THIS KIND OF TAG -->, HTML considers it to be comments. This is used for web design firms where other people have to read other's people code.

So don't <!-- put any includes inside of this tag -->

Do you know basic PHP? It is easy to add an include that way.
  • 0
michaelgs
Posts: 4
Joined: 14 Jun 07
Trust:
Drian, Thank you very much for your help.
No I do not know much about anything but I am a quick learner.
Right now I have to learn all the stuff on affilorama.
To be honest I have tried to make a living on line for three years and this is just one more attempt.
All I have done so far is spend money. And I am truly getting to old for that. I am looking to finance my retirement.
Thank you again
Michael
  • 0
michaelgs
Posts: 4
Joined: 14 Jun 07
Trust:
Adrian,
I was wrong.
The includes still do not work.
Now I have only the text #include Virtual XXX showing.
"http://www.freelancersjobexchange.com"
Michael
  • 0
Last edited by sydney on 03 Jun 10 3:52 am, edited 1 time in total.
Reason: link not found
 

PremiumMember
chatyak86
Posts: 1369
Joined: 17 Jun 06
Trust:
Don't feel so bad... it took me 7 years to finally earn some cash :)

You are going to.........

.........need 2 files.

Your HTML pages and your menu page.

1) Copy the menu code you have now (the html part) and paste that into a completely blank page.

2) Save that blank page as navigation.inc

3) Where your menu was in your HTML page.... delete all of that code.

4) In its place.... put this....

<?php include("navigation.inc"); ?>

5) Save the page as .php

6) Now all you have to do is put that 1 line of php code into any php page where you want your menu to appear.... when you need to update the menu for the entire site... simply change the code in the navigation.inc file.


PS: Keep in mind if you have folders and subfolders and pages of different levels in your site... you cannot simply use <?php include("navigation.inc"); ?> because it won't be able to find the file. What I suggest is to do this...

<?php include("http://www.mysitehere.com/navigation.inc"); ?>

Now it will read it on any page.
  • 0
Site Admin
markling
Posts: 2488
Joined: 13 Jun 06
Trust:
Hi Michael,

I was just about to suggest what Adrian just suggested. Either reference your php includes as a whole URL (including the "http://www.yoursite.com part"), or be very careful about how you reference the file when its in another directory since the rules are a little different between php and html.

Basically, with PHP having a / at the start doesn't say "go back to the root directory", so you usually need to use a combination of dots and slashes.

Probably easiest just to use the whole URL :)

All the best,
Mark
  • 0
Last edited by sydney on 03 Jun 10 3:54 am, edited 1 time in total.
Reason: sample link
 

Limited time special - Try Affilorama Premium for just $1 for 7 days: http://www.affilorama.com/premium