PHP Include()

Thank you in Advance.

I need help; I am working on a personal website that is currently working. Recently, I build a second website that also works. The second website only has a topnavigation and a image slider in the body.

What I’m trying to do is to insert the second website inside the first one. I tried using an include() function which work halfway but it doensn’t load my images and style.css that is located in separate folders. I need to know if there is a better way of doing this.

Basically I want to grab the first website and insert the functinality of the otherone in it.

For example:
1st website has a naviation bar, text and footer.
2nd website has a image that changes every few second.

How can I combine both? I don’t want to move the code from one site to the other because it might become messy.

please help.


Since your first site has most of the things… I’d grab the images from the second… the way I did it was…

making include.php
then in that create a here document… like so.

$insertHTML = <<<anyname

anyname [/php]

insert the html for the images… then go to teh page you want that piece inserted…

<?php echo $insertHTML ?>

Hope that’s what you wanted…

Sponsor our Newsletter | Privacy Policy | Terms of Service