Forum Moderators: coopster
plus others uploaded it then sat back to watch my master peice in action, but hey guess what! includes dont quite work like that, the sites all loaded under each other and the page was veery wide, and even my nav table include had the same rollover effect as the first site in the includes.
Is there a way this can be done easily or should i forget this idea now, I have no need for this on my site I am just at the start of learning php so have tried this just for education reasons.
Regards Ian
uploaded it then sat back to watch my master peice in action
rofl, I have done the same so many times with roughly the same results, though I have brought down a few servers too. ;)
no, includes don't really work like that. You included the whole html page from each site and therefore literally blew yours to shreds.
You can't really include full pages like that. Think about the html structure. You would have referenced 5 css files, 5 js files, have 5 html, head, title and body tags among various other problems. View the source on that page, it would give you an idea of the actual html chaos that ensued.
What you would want to include is a piece of the page, not the whole thing. If you wanted news you could look at RSS feeds where the stories are sent out stripped (very loose description) and can be formatted to be used on your site.
The include function, literally, just grabs the output of the targetted file and dumps it into your page wherever the include statement is.
Regards Ian
As for what you were trying to do, that can be done by using frames or iframes -but no need for includes.