Results 1 to 8 of 8

Thread: Include... x2?

  1. #1
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default Include... x2?

    When I use a PHP include, (in this case i'm including header.php) it adds it twice. (there's two headers now).

    There can't be anything wrong with the PHP
    ( <?php include "header.php"; ?> ) or my header code (as it's only the code for one..).

    Thanks

  2. #2
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    You haven't put the include on header.php too have you?


  3. #3
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    No I haven't. Here's header.php:

    PHP Code:
    <?php

    echo '<div class="header">
    <div class="logo"></div>
    <div class="search"><input type="text" class="search_text" /></div>
    </div>'
    ;
    ?>

  4. #4
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Erm.

    Hm. And the page where the include is supposed to show? Seeing as there is no obvious faults with header.php?


  5. #5
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    It's only there once.

  6. #6
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    Haha, nevermind fixed it.

    Edited by Meti (Forum Moderator): Please do not double post, when you simply can edit your first post.
    Last edited by Meti; 31-10-2008 at 03:02 PM.

  7. #7
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Lol ok. What was it


  8. #8
    Join Date
    Jul 2008
    Posts
    535
    Tokens
    75

    Default

    I had included config.php, but forgot that the contents inside it were those of header.php.

Posting Permissions

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