SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Nov 2003
    Location
    Brisbane, Australia
    Posts
    408
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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="http://www.domainname.com/external/page.php" 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.

    mrmbarnes

  2. #2
    SitePoint Evangelist captainccs's Avatar
    Join Date
    Mar 2004
    Location
    Caracas, Venezuela
    Posts
    516
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    How you build it is up to you but the browser just wants to see a link to the contents.

    HTML Code:
    <iframe src="http://www.w3schools.com"></iframe>
    Denny Schlesinger
    web services

  3. #3
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    You do not need a frame, just use css and overflow property.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •