Running a PHP Include File In A Frame

Hi All

I have a client who insists on a layout for their website that they made… it is more print than web.

The only way I can get this layout working is to have it as a background image and run the website over the top.

To do this I need to run the content in a frame to make sure it does not go outside the layout.

It is rare that I use frames and have not in ages and have never tried to do it this way.

I have my own CMS and use an include file to include the main body… this file uses info from the main page and then from dozens, if not hundreds of other files.

I have tried the following:

<iframe src=“<?php include (”/home/account/public_html/external/page.php"); ?>" width=“615” height=“450”></iframe>

<iframe src=“” width=“615” height=“450”><?php include (“/home/account/public_html/external/page.php”); ?></iframe>

These did not work of course so I thought I would link straight to the file:

<iframe src=“” width=“615” height=“450”></iframe>

This just created a pile of errors as the file could not access the other information.

So… I thought I would create a new file and add a pile of extra code so that it would work but that didn’t work either as it needs more info that is only pulled in with the main page.

Any help on getting this working would be great.

The bottom line is that I need to run and include within a set area of a website.

Thanks for your help.


How you build it is up to you but the browser just wants to see a link to the contents.

<iframe src=""></iframe>

You do not need a frame, just use css and overflow property.