SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Simple PHP Include Question

    Hello, I'm new to PHP and HTML, and I have a question. The top of my page contains this:

    PHP Code:
    <?
    #########################################
    # !! - LEAVE THIS STUFF WELL ALONE - !! #
    #########################################
    include ('includes/top_index.php');
    include (
    'templates/header.htm');
    include (
    'templates/footer.htm');
    #########################################
    #    - May all your piles be money -    #
    #########################################
    ?>
    Note....it displays those templates, but is there any way to tell it to send the footer template to the bottom of the page instead of displaying it right underneath the header template (and besides placing it in it's own code down at the bottom of the page)? Thanks.

  2. #2
    SitePoint Enthusiast jlgarcia's Avatar
    Join Date
    Sep 2001
    Location
    Baja California, México
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put the includes exactly where you want them to appear.

    I supouse that you want the head first,
    then some content and later the footer.
    Arrange your page that way.

    Maybe like this:

    PHP Code:
    <?
    #########################################
    # !! - LEAVE THIS STUFF WELL ALONE - !! #
    #########################################
    include ('includes/top_index.php');
    include (
    'templates/header.htm');
    ?>

    <!-- Note the closing PHP tag, opening HTML tag,
         closing HTML and opening PHP again. -->

      <p>HTML Content of this page</p>

    <?
    include ('templates/footer.htm');
    #########################################
    #    - May all your piles be money -    #
    #########################################
    ?>
    Hope this works for you.
    Last edited by jlgarcia; Mar 17, 2002 at 01:53.
    Use the source, Luke...


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
  •