flemingmike Posted July 9, 2010 Share Posted July 9, 2010 here is my code, i cant figure out how to get the text document into the frame because i broke out of php. anybody able to help? <?php include("style.php"); ?> <body bgcolor="#C0C0C0"> <div align="center"> <table border="0" width="825" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"> <table border="0" width="95%" cellspacing="0" cellpadding="0"> <tr> <td width="538"> <p align="center"> <table border="0" width="97%" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"> <table border="0" width="403" cellspacing="0" cellpadding="0"> <tr> <td> <font color="#FFFFFF" size="5">Welcome to the <i>NEW</i></font></td> </tr> <tr> <td> <p align="center"> <font color="#FFFFFF"> <font class="glowtitle" style="font-size: 28pt">Taylor Dance Centre</font></font></td> </tr> <tr> <td> <p align="right"> <font color="#FFFFFF" size="5">official website.</font></td> </tr> </table> </div> <p align="center"> <font color="#FFFFFF" size="4">Our dedicated, nationally acclaimed teaching staff will strive<br> to assist students in achieving their goals.<br> At TDC we'll help you to...<br><br> </font> <div align="center"> <table border="0" width="90%" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"> <p align="center"> <img border="2" src="images/soar.png" width="207" height="280"><font color="#FFFFFF" size="4"><br>to new heights!</font></td> </tr> <tr> <td> <p align="center"> <img border="2" src="images/stretch.png" width="186" height="280"><font color="#FFFFFF" size="4"><br>all possibilities!</font></td> <td> <p align="center"> <img border="2" src="images/friends.png" width="269" height="178"><font color="#FFFFFF" size="4"><br>that last a lifetime!</font></td> </tr> </table> </div> </td> </tr> </table> </div> </td> <td valign="top" width="246"> <div align="right"> <p align="center"> </div> <div align="right"> <p align="center"> </div> <div align="center" class="myBoxbb"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <p align="center"><b><i><font size="5" class="glowtitle2">News Updates</font></i></b><p align="left"> <font size="4">Update 1</font></td> </tr> </table> </div> </td> </tr> </table> </div> </td> </tr> </table> <p align="center"> </div> Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/ Share on other sites More sharing options...
Pikachu2000 Posted July 9, 2010 Share Posted July 9, 2010 Maybe my eyes are going bad, but I don't see where you've tried to get a text (or any other) document into a frame. What line would that be on? Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083670 Share on other sites More sharing options...
PFMaBiSmAd Posted July 9, 2010 Share Posted July 9, 2010 You already have a thread for this. Why start another one? You do understand that the purpose of the <?php and ?> tags are to delimit php code on the page. You can put them anywhere you want as long as the result makes sense. Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083672 Share on other sites More sharing options...
flemingmike Posted July 9, 2010 Author Share Posted July 9, 2010 i marked the the last one as solved by accident. the php is on line 87 on the following: <?php include("style.php"); ?> <body bgcolor="#C0C0C0"> <div align="center"> <table border="0" width="825" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"> <table border="0" width="95%" cellspacing="0" cellpadding="0"> <tr> <td width="538"> <p align="center"> <table border="0" width="97%" cellspacing="0" cellpadding="0"> <tr> <td> <div align="center"> <table border="0" width="403" cellspacing="0" cellpadding="0"> <tr> <td> <font color="#FFFFFF" size="5">Welcome to the <i>NEW</i></font></td> </tr> <tr> <td> <p align="center"> <font color="#FFFFFF"> <font class="glowtitle" style="font-size: 28pt">Taylor Dance Centre</font></font></td> </tr> <tr> <td> <p align="right"> <font color="#FFFFFF" size="5">official website.</font></td> </tr> </table> </div> <p align="center"> <font color="#FFFFFF" size="4">Our dedicated, nationally acclaimed teaching staff will strive<br> to assist students in achieving their goals.<br> At TDC we'll help you to...<br><br> </font> <div align="center"> <table border="0" width="90%" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"> <p align="center"> <img border="2" src="images/soar.png" width="207" height="280"><font color="#FFFFFF" size="4"><br>to new heights!</font></td> </tr> <tr> <td> <p align="center"> <img border="2" src="images/stretch.png" width="186" height="280"><font color="#FFFFFF" size="4"><br>all possibilities!</font></td> <td> <p align="center"> <img border="2" src="images/friends.png" width="269" height="178"><font color="#FFFFFF" size="4"><br>that last a lifetime!</font></td> </tr> </table> </div> </td> </tr> </table> </div> </td> <td valign="top" width="246"> <div align="right"> <p align="center"> </div> <div align="right"> <p align="center"> </div> <div align="center" class="myBoxbb"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <p align="center"><b><i><font size="5" class="glowtitle2">News Updates</font></i></b><p align="left"> <font size="4"><?php $file = file_get_contents('./updates.txt', true); '.$file.' ?> Update 1</font></td> </tr> </table> </div> </td> </tr> </table> </div> </td> </tr> </table> <p align="center"> </div> Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083674 Share on other sites More sharing options...
PFMaBiSmAd Posted July 9, 2010 Share Posted July 9, 2010 You can mark threads Unsolved as well. Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083675 Share on other sites More sharing options...
flemingmike Posted July 9, 2010 Author Share Posted July 9, 2010 oh, good to know. i never even thought to try. Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083676 Share on other sites More sharing options...
flemingmike Posted July 9, 2010 Author Share Posted July 9, 2010 ok, so someone just posted something similar and i was able to get this out of it: <? $fn = "updates.txt"; // path name of text file print htmlspecialchars(implode("",file($fn))); ?> it returns everything on one line. is there a way to put each line on each line? Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083679 Share on other sites More sharing options...
Pikachu2000 Posted July 9, 2010 Share Posted July 9, 2010 Yeah, well, change the open tag from <? to <?php. The short open tag is deprecated, and will cause you headaches in the long run. Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083684 Share on other sites More sharing options...
flemingmike Posted July 9, 2010 Author Share Posted July 9, 2010 i found a different way: <?php $filename = "updates.txt"; $farray = file($filename); foreach ($farray as $line) { $line = split("[|]",trim($line)); $elements .= "$line[0]<br/>"; } print $elements; ?> Quote Link to comment https://forums.phpfreaks.com/topic/207264-break-out-of-php-help/#findComment-1083687 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.