DJDex Posted May 6, 2009 Share Posted May 6, 2009 Hey I'm trying to display information on a webpage that pulls its information from a DAT file. Here is what I have it seems to find the file but never actually displays information my page jsut displays blank <?php $fileid = $_GET["id"]; $filename = "C:\\Hosts\\XFRadio_net\\webroot\\data\\$fileid.dat"; $fp = @fopen($filename,"r") or die("Couldn't open file"); $data = fread($fp, filesize($filename)); fclose($fp); $data2 = explode("|", $data); $TEST = 'TEST'; ?> <div id="fileholder"> <div id="fileinfo"> <div id="fileinfobox"> <p id="fileinfotext"> <h2 class="style3"><? echo $data2[0]; ?></h2> <p class="style4"> <? echo $data2[1]; ?><br /></p> </p> </div> </div> <div id="picbox" align="left"> <div id="pic" align="left"> <p class="style4"> <? echo $data2[2]; ?></p> </div> </div> <div id="footer2"> <p id="footer2text"> <p id="images"><h2 class="style3">Technical Drawings:</h2></p> <? echo $data2[3]; ?> </p> <? echo $data; ?> <? echo $TEST; ?> </div> </div> I tried even just doing a string and this doesn't even display either. Is there something I'm missing? This fille is also included via that get command into the main content of my weblayout. Any help appreciated. Thanks! Link to comment https://forums.phpfreaks.com/topic/157033-parsing-dat-file/ Share on other sites More sharing options...
BioBob Posted May 6, 2009 Share Posted May 6, 2009 What happens if you open the .DAT file with NOTEPAD? Link to comment https://forums.phpfreaks.com/topic/157033-parsing-dat-file/#findComment-827217 Share on other sites More sharing options...
PFMaBiSmAd Posted May 6, 2009 Share Posted May 6, 2009 What exactly do you get as output? What does a "view source" of the page in your browser show? Link to comment https://forums.phpfreaks.com/topic/157033-parsing-dat-file/#findComment-827222 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.