|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
PHP output to html
Not sure if this is even doable.
I have a rss feed set up and it works so long as I access it as a separate page http://www.johnstons.cc/rss_news.php Wha I want to do is have it embedded in on the site's main page. I'm using phpbb2 as my foundation. phpbb2 uses .tpl files that are called from the related .php page. So, with that bit of info, is it possible to incude: Code:
<?php
include('rss_newsfeed.php');
?>
in <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <td class="catHead" height="25"><span class="genmed"><b>Feeds of Knowledge</b></span></td> </tr> <tr> <td class="row1" align="center"><span class="gensmall"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> <table cellspacing="0" cellpadding="2" border="0" width="100%"> <tr> <br> <div align="center">Tutorials and News</div> <br> <table width="100%" border="1"> <tr> <td width="50%" valign="top"><div align="center"><font size="-1">PHP Tutorial from Codewalkers</font></a><br /><br /> FEED RESULTS HERE</div></td> <td width="50%" valign="top"><div align="center"><font size="-1">Another News Feed</font></a><br /><br /> FEED RESULTS HERE</div></td> </tr> </table> |
|
#2
|
|||
|
|||
|
RE: PHP output to html
did you try it?
|
|
#3
|
|||
|
|||
|
RE: PHP output to html
Guess I should of noted that ..
Yes I did try it, no errors, no content either. The page loaded and the table "block" showed with the 2 <td's I have dividing the layout, but no content. I tried to embed Code:
<td width="50%" valign="top"><div align="center"><font size="-1">PHP Tutorial from Codewalkers</font></a><br /><br />
<?php
include('rss_newsfeed.php');
?>
</div></td>
nada |
|
#4
|
|||
|
|||
|
RE: PHP output to html
try echoing another line of text inside the include file to see if that appears in the table cell. That will help determine if the include portion is working. Also, what is the extension of the file you are putting the include in?
|
|
#5
|
|||
|
|||
|
RE: PHP output to html
It seems I can't get the include to work. I tried to echo a little text, nothing.
I think it might be because of the PHPBB structure? My rss_feed pages are both .php, but the page the html code is embedded in is a .tpl file extension. .tpl is similar to .txt (I think). However, if I change the extension to .php or even .html the rest of the site doesn't load right I can get the feed output, as long as I use .php extension, you can see it at http://www.johnstons.cc/rss_test.php Here it prints out just fine and presents the proper layout I want |
|
#6
|
|||
|
|||
|
RE: PHP output to html
Unfortunatly I am not familiar with PHPBB so I relly can't be of much help there, but your assumption about the problem seems to be correct. The php is not being parsed when the page is loaded, so the include is not working.
|
|
#7
|
|||
|
|||
|
RE: PHP output to html
Thanks Blindeddie,
I think I have figured out a solution, not sure if my minimal knowledge of php will allow me to do it though. It's more phpbb structure related, so forward and onward.... |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > PHP output to html |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|