Problem with php include page

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

twmprys

Thread Starter
Joined
Jun 4, 2009
Messages
111
I'm having a problem with the php 'include' instruction. I want to use the same menu on a number of pages, but when I include it on those pages, it blanks everything else out. I've done this before and it worked fine. I'm totally confused!
 

colinsp

Colin
Joined
Sep 5, 2007
Messages
2,362
Attach your code or give us a url so we can see what is happening.
 

twmprys

Thread Starter
Joined
Jun 4, 2009
Messages
111
The php command is:

<?php include("dewislen1.php"); ?>

placed right at the top of the page. The included page consists of a table holding .pngs and a .swf image. The main page should show a picture and some php text, but I can only see the included page. Here's the url:

http://www.santcurig.org/indexamgen.php
 

colinsp

Colin
Joined
Sep 5, 2007
Messages
2,362
What do you mean by top of the page in your php page or as you view it in a browser?

If you mean the former then that is the incorrect placement. It should be on the page in the html flow and in the div or table cell where you wish it to appear, so it should be in your code between the body tags.

If I have misunderstood what you are saying sorry.
 

twmprys

Thread Starter
Joined
Jun 4, 2009
Messages
111
OK, I put the include after the open body tag - my browser (Safari) displays the included material but now uses default margins and default white page background - there's still no sign of the page content. Firefox is better - displays correct margins and background colour, but still no sign of page content.
 
Joined
Feb 25, 2004
Messages
445
Without seeing the code in the included file its hard to tell exactly what is going on.

But a couple suggestions that might help you track down what exactly is going on :)

Install Firebug. Its great for debugging HTML.

Try including your menu in just a blank page, and slowly add elements to that page.

MOST likely what is happening is you have a mis-match of tags coming from the menu include and its throwing off the processing of the HTML
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top