PDA

View Full Version : ALOT of errors when including


Fronix
08-31-2008, 12:24 AM
Hey im trying to include a news script on my frontpage but im getting just a bunt of crap on the page http://wow.bloodfury.se/home.php. And yes im including the right php file

<?php $template = "Plain style"; include 'news/index.php'; ?>
Thats how i include it now but im getting that stuff why?

Please help i think its an easy way to solve im just dumb to figure it out.

rattlsnak
08-31-2008, 12:32 AM
This could be a blind leading a blind as I'm new to php, but I think Includes are supposed to have () like this: include("header.php");

Fronix
08-31-2008, 12:35 AM
Well that did not solve the problem, but its something i know that :P

rattlsnak
08-31-2008, 01:02 AM
Also, the first ; terminates that line, so try it like this:

<?php $template = "Plain style";
include ("news/index.php"); ?>

.......edited to fix the include statement!

Fronix
08-31-2008, 01:25 AM
nope not working :(

Fronix
08-31-2008, 01:29 AM
Yay its working i had wrong script in the news file xD

rattlsnak
08-31-2008, 03:15 AM
OK, just i also learn something, the above script i posted actually works?? :D

davidj
08-31-2008, 09:18 AM
nice one rattlsnak

big highfive + moonwalk << respect dance