Problem with including files
Using <? include 'header/footer.php'; ?> instead of Template function in Dreamweaver.
Hi everyone,
I am new to PHP so please excuse me if my question seems too stupid to u. I used to be using Dreamweaver's template function to all my websites, but I found that sometimes Template can be very hard to contral, and sometimes it has unexpected activities.
So i decided to include a header.php and a footer.php file to achieve the same result, which is to have a consistant layout throughout the site and it is share to all files.
Everything works well, I had upload the site....BUT when i view the source code, i fugure i had 3 sets of <head> and <body> tag. One for the hearder.php, one for footer.php and one for content.php....is it suppose to be like that? please advise? it still works, but i was just wondering will it slow down the loading time or if someone can provide me a solutions, that would be great !!!
thanks
yvonne
Comments
HTML tags
HTML Tags
Here it is nice and simple:
In your header.php and footer.php scripts, do not use the html, head, or body tags. Then in your page that you will include the scripts, place them between the body tags where you want the header and footer to show up.
It's that simple.
You must me logged in to write a comment.