Jump to content


Photo

Template Help


  • Please log in to reply
1 reply to this topic

#1 Guteman

Guteman
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts
  • LocationWisconsin

Posted 10 March 2006 - 10:22 PM

Alright I have this code into my index.php. Where it says <table width=100>Hello World</table> I want to include a php file suc as news.php, how do I properly do that?

Here is the code:

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
$objFile = new LoadFile("template.php");

$strContent=$objFile->strContent;
$strContent=ereg_replace("@CONTENT@","
<table width=100>
Hello World
</table>


",$strContent);
echo $strContent;
[/quote]

#2 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 11 March 2006 - 12:08 AM

$objFile = new LoadFile("template.php");

$strContent=$objFile->strContent;
$strContent=ereg_replace("@CONTENT@","
<table width=100>
Hello World
</table>
include("news.php");

",$strContent);
echo $strContent;

just add the include thing to it. its simple.. unless i didnt understand you
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users