Dangmnx Posted July 9, 2008 Share Posted July 9, 2008 okay guys! i have a question. my website is http://www.dangmn.net and i am currently using an Iframe for my blog, i want to know if there is a way to make my blog display without using the Iframe! i even tryed copying and paste the code below into the <body> </body> section of my html but it still doesnt work. <? $tpath = "/home/dangmnne/public_html/dn/news/"; include($tpath . "news.php"); ?> did i do something wrong?? Quote Link to comment Share on other sites More sharing options...
peranha Posted July 9, 2008 Share Posted July 9, 2008 Always start you php with <?php not the short version <? Quote Link to comment Share on other sites More sharing options...
Dangmnx Posted July 9, 2008 Author Share Posted July 9, 2008 so its suppose to be like this? <body> <?php = "/home/dangmnne/public_html/dn/news/"; include($tpath . "news.php"); ?> </php> </body> Quote Link to comment Share on other sites More sharing options...
peranha Posted July 9, 2008 Share Posted July 9, 2008 It would just be <?php $tpath = "/home/dangmnne/public_html/dn/news/"; include($tpath . "news.php"); ?> Not sure if include will work that way, most just look like include("folder/news.php"); Quote Link to comment Share on other sites More sharing options...
Dangmnx Posted July 9, 2008 Author Share Posted July 9, 2008 OMG! okay so i did it just like you said: <body> <?php $tpath = "/home/dangmnne/public_html/dn/news/"; include("folder/news.php"); ?> </body> and it still would not appear to show my blog! Quote Link to comment Share on other sites More sharing options...
peranha Posted July 9, 2008 Share Posted July 9, 2008 How are your folders set up?? main site is ?? main_site/folder/folder/folder This file is in what folder?? and the path to that folder from this folder is what??? From looking at previous posts I think it should be <?php include ("news/news.php"); ?> Quote Link to comment Share on other sites More sharing options...
Dangmnx Posted July 9, 2008 Author Share Posted July 9, 2008 it is, /public_html/dn/news Quote Link to comment Share on other sites More sharing options...
peranha Posted July 9, 2008 Share Posted July 9, 2008 this file would be in the dn folder correct? if so then this should work <?php include ("news/news.php"); ?> also what is this file called, it should have the .php extension. Quote Link to comment Share on other sites More sharing options...
Dangmnx Posted July 9, 2008 Author Share Posted July 9, 2008 yeah the whole path to the file is /public_html/dn/news/newsphp.php http://www.dangmn.net/dn/news/news.php Quote Link to comment Share on other sites More sharing options...
peranha Posted July 9, 2008 Share Posted July 9, 2008 what page are you including this file in?? I see that your home page is home.html these will not work as the files have to be .php in order to have php put in the file. Quote Link to comment Share on other sites More sharing options...
Dangmnx Posted July 9, 2008 Author Share Posted July 9, 2008 so should i save home.html as home.php? Quote Link to comment Share on other sites More sharing options...
peranha Posted July 9, 2008 Share Posted July 9, 2008 if that is where you want the news at, yes you will have to Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.