PHP related question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: PHP related question (/showthread.php?tid=26758) |
PHP related question - El Forum - 01-22-2010 [eluser]Unknown[/eluser] I have a .php inlcude that is blowing out my template from left to right. Below is a sample of the code. Code: <td width="71%" height="444" valign="top"><table width="100%" height="2%" border="0" align="center" cellpadding="0" cellspacing="0" class="text"> <tr> <td colspan="10"><div align="left"><font color="#000000"><b> <? include 'mysecret.php'; ?> <? include 'also_my_secret.php'; ?> </b></font></div></td> </tr> <tr> <td height="14"><div align="justify"></div></td> </tr> Here is the code that is blowing out the template php Code: <? $URL = "http://www.myotherwebsite.com/testing.html"; $FILE = fopen("$URL", "r"); $r = ""; do { $DATA = fread($FILE, 8192); if (strlen($DATA) == 0) { break; } $r .= $DATA; } while (true); $START = '<TD bgcolor="#F7F7EC" colspan="10"align="center"><b>Closed Term</b></td>'; $END = '<br>Random info<br>'; $STUFF = eregi("$START(.*)$END", $r, $CONTENT); $REP1 = eregi_replace("\r", "", $CONTENT[1]); $REP2 = eregi_replace(' bgcolor="#CCCC99"', "", $REP1); $REP3 = eregi_replace('<TD class="bodytext" bgcolor="#F7F7EC" colspan="10" align="center">', '</TABLE>', $REP2); $REP4 = eregi_replace(' bgcolor="#F7F7EC"', "", $REP3); $REP5 = eregi_replace(' BGCOLOR="CCCC99"', "", $REP4); $REP6 = eregi_replace("\n\n", "", $REP5); $REP7 = eregi_replace(' bgcolor="F7F7EC"', "", $REP6); fclose($FILE); echo $REP7; //$OUT = fopen("index.html", "w"); //fwrite($OUT, $REP6); //fclose($OUT); ?> Any ideas. In the old template is displayed fine. PHP related question - El Forum - 01-26-2010 [eluser]Greg Aker[/eluser] pajarodune: Are you using CodeIgniter here? I'm going to go ahead and remove the links in your signature. They can be taken as spammy. |