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?? Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/ 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 <? Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585058 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> Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585061 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"); Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585063 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! Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585067 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"); ?> Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585077 Share on other sites More sharing options...
Dangmnx Posted July 9, 2008 Author Share Posted July 9, 2008 it is, /public_html/dn/news Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585084 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. Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585085 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 Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585087 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. Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585090 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? Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585091 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 Link to comment https://forums.phpfreaks.com/topic/113849-how-to-make-this-page-display/#findComment-585290 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.