Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Jun 2003
    Location
    CANADA
    Posts
    3
    Member #
    1681
    i dont want to use frames, or iframes in my design... is there some way that i would be able to change a 'content' part of my site with php instead?

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    not sure what you mean by this, but if you are talking about changing the content when the page has loaded using php i don't think so. This is because php performs all its actions before the page is loaded. So the page would have to re-load to display something new.

    You can however use hidden divs, some javascript and php includes to do the job. Not sure how good that would be with cross browser compatibility though. Here is a related thread on this topic...

    http://www.webdesignforums.net/thread6836.html
    JR

  4. #3
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    I think I know what you mean. You have a site with one or two frames that appear on all pages (eg, title and menu), then each page goes into the 'content' frame. This has a few disadvantages.

    Instead, design a single page with all the bells and whistles, and where you're content would go, type in something that can't be mistaken for html, like !!!!!CONTENT GOES HERE!!!!!. Then open up the page in a text editor and copy everything before !!! etc into a new file 'header.inc', and everything after into 'footer.inc'.

    Then in all your content pages you say something like:
    PHP Code:
    <?php require_once "header.inc"?>
    <p>blah blah</p>
    <?php require_once "footer.inc"?>
    From there you should customize header.inc so that it has a different page title for each page, etc.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  5. #4
    Junior Member
    Join Date
    Jun 2003
    Posts
    18
    Member #
    1696
    since we're on the topic:

    i've always wondered this.

    does having header.txt and header.inc make ANY difference? at all? especially in speed?

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    No difference at all.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    The difference is that if you make it a .txt file or an .inc file, your server will not by default hide any php code that exists in it.

    Always make it a .php file if you are including it as a function package.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:44 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com