Zeradin Posted August 15, 2008 Share Posted August 15, 2008 Hey this has got to be an easy solution, but i can't find it i have this: <?php $id = $_GET['id']; $file = "xml/".$id.".xml"; $xml = simplexml_load_file($file) or die ("Unable to load XML file!"); if ($id == NULL){ echo "you fucked up!"; } else { echo '<h2 class="newstitle">'.$xml->title.'</h2> <span class="news"> </span> <table cellpadding="6" cellspacing="6" border="0" align="right"> <tr><td> <table cellpadding="4" cellspacing="4" border="1"> <tr> <td valign="top" width="200" align="center" class="news"> <img src="'.$xml->photo.'" alt="gamephoto" /><br /> <span class="news"><strong class="red"><br> Release Date:</strong><br /> '.$xml->rdate.'<br /> <br /> <strong class="red">Publisher: '.$xml->developer.'<br />Platform(s): '.$xml->platforms.'</strong> <br /> </span> </td> </tr> </table> </td></tr></table>'; echo nl2br('<span class="news">'.$xml->info.'<br /><br></span>'); echo '<table width="100%" cellpadding="2" cellspacing="3"> <tr> <td width="14%" valign="top"> Put reviewer photo here </td> <td width="86%" valign="top" class="news"> reviewer write up goes here...along with link to their profile </td> </tr> </table>'; } ?> i type in the review.php?id=8 the 8.xml is in xml/ and it doesn't load additionally i have something else that does basically the same thing referring to the same folder and that one works when i load the page though i just get a blank screen. i look at the source... nothing. what gives? Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/ Share on other sites More sharing options...
bombes Posted August 15, 2008 Share Posted August 15, 2008 You should have your head and body tags (<head></head><body>...html code...</body>). Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617393 Share on other sites More sharing options...
Zeradin Posted August 15, 2008 Author Share Posted August 15, 2008 nah i have another page that doesn't have those it shouldn't matter in fact i tried putting those tags in and it's still blank. good idea though Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617395 Share on other sites More sharing options...
Maq Posted August 15, 2008 Share Posted August 15, 2008 Just tested your script on one of my sites and it worked fine. I had to take out the xml objects. Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617415 Share on other sites More sharing options...
Zeradin Posted August 15, 2008 Author Share Posted August 15, 2008 the other examples that previously were working, now aren't. what gives? Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617416 Share on other sites More sharing options...
Zeradin Posted August 15, 2008 Author Share Posted August 15, 2008 i am so annoyed right now, they were working perfectly before... now i can't get them to display anything even if i put an echo at the beginning of the script before the xml file calls Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617420 Share on other sites More sharing options...
Maq Posted August 15, 2008 Share Posted August 15, 2008 Since your script worked for me try checking some external factors such as, the IP your pointed at. Do you have a dev and a live site? I don't think it's your code... Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617425 Share on other sites More sharing options...
Zeradin Posted August 15, 2008 Author Share Posted August 15, 2008 wow i found the problem my ftp client was uploading versions of the files that were from 1969 so everytime it uploaded a file it'd upload it blank... even though the files i had were populated i restarted the client and it fixed it... weiiiird sorry for wasting your time. Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617432 Share on other sites More sharing options...
Maq Posted August 15, 2008 Share Posted August 15, 2008 Haha I've never heard of that before. What FTP client are you using? Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617438 Share on other sites More sharing options...
Zeradin Posted August 15, 2008 Author Share Posted August 15, 2008 Core FTP Lite otherwise a very sweet client Quote Link to comment https://forums.phpfreaks.com/topic/119839-solved-file-showing-blank-page/#findComment-617530 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.