View Full Version : Please help me Its urgent!!! Problem in including file

05-28-2009, 04:59 AM
Hello Friends, how r u all?

I am creating one website in that there is one navigation and footer which I want to be same in all pages so I had created one navigation.html and one footer.html

now I want to create one file where I want to include navigation html and footer html and in middle i want get all other pages content so how should I do this

Even I am getting problem in including html when I uses the below code it dont show me anything in preview in browser

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

pls help me

05-28-2009, 05:12 AM
are your pages php?

05-28-2009, 05:20 AM
yes its php

05-28-2009, 05:30 AM
<?php include('navigation.html'); ?><?php include('footer.html'); ?>

try those

05-28-2009, 06:11 AM
Thanks a lot
got it but how to change the content now

05-28-2009, 06:14 AM
and what will be the script in menu file to change the respective content

05-28-2009, 07:06 AM
dont understand your question

05-28-2009, 07:19 AM
oh! sorry

<script type="text/javascript">
function changeContent(pPage){

<div id="maindiv">
<div><?php include_once("menu.php"); ?></div>
<iframe id="content" width="960px;" height="auto" scrolling="auto" frameborder="0" border="0"></iframe>
<?php include_once("footer.php"); ?>

ok this is my code in index file now I want by default home page shoudl display in iframe

05-28-2009, 06:46 PM
im lost too

05-28-2009, 08:15 PM
I want by default home page shoudl display in iframe
Don't know why you want an iframe setup for your pages to be displayed. Would be best to have separate pages. But if you need to have them displayed inside the iframe review this thread. http://www.dreamweaverclub.com/forum/showthread.php?t=29359