PDA

View Full Version : Embedding News into a HTML page



ChampJames.
17-04-2010, 12:22 AM
Hi, I am using FusionNews and the code that I have been given to embed the news into my webpage is;

?php
include '/home/jph92/public_html/news/news.php';
?

But when i put this code in, it just shows up on my page as text.

Normally I use iFrames, so I can make the page 'news.php' or something and only include this, but this site I am working on doesn't use iFrames, so it is just a HTML page.

Please could somebody give me some advice on fixing this problem?
Thanks

iDenning
17-04-2010, 12:37 AM
Why not make the page php, it has no effects? rename the index.html to index.php?

ChampJames.
17-04-2010, 12:38 AM
i tried that. because ive done that before, but it just stayed the same? :s

iDenning
17-04-2010, 12:40 AM
btw it should be


<?php
include '/home/jph92/public_html/news/news.php';
?>i think. lol.

If not, try


<?php
"include '/home/jph92/public_html/news/news.php"';
?>I know nothing about php but im sure its one or the other.


EDIT;; WAIT LOL.

Link to it is wrong, it should be /news/news.php

ChampJames.
17-04-2010, 12:42 AM
haha oops.
i cant even copy and paste right at this time haha.
i feel stupid now.
its working, thanks :)

iDenning
17-04-2010, 12:43 AM
LOL good, got there in the end :)

Apolva
17-04-2010, 12:46 AM
<?php
include('news/news.php');
?>

Edit: Oh, didn't see you'd fixed it lol.

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