Log in

View Full Version : Include... x2?



wsg14
30-10-2008, 10:44 PM
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

L?KE
30-10-2008, 10:46 PM
You haven't put the include on header.php too have you?

wsg14
30-10-2008, 10:47 PM
No I haven't. Here's header.php:


<?php

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

L?KE
30-10-2008, 10:53 PM
Erm.

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

wsg14
30-10-2008, 10:58 PM
It's only there once.

wsg14
30-10-2008, 10:59 PM
Haha, nevermind fixed it.

Edited by Meti (Forum Moderator): Please do not double post, when you simply can edit your first post.

L?KE
30-10-2008, 11:02 PM
Lol ok. What was it :P

wsg14
31-10-2008, 12:11 AM
I had included config.php, but forgot that the contents inside it were those of header.php.

Want to hide these adverts? Register an account for free!