dmcalerney Posted March 1, 2006 Share Posted March 1, 2006 I've got this script where it does some calculations and at the end it calls itself again. In internet explorer, all of my echo statements that I'm using for debugging are showing up on the screen. They don't show up when I'm using firefox. Does anyone else know what's up with this?Thanx,Danny Quote Link to comment Share on other sites More sharing options...
zq29 Posted March 1, 2006 Share Posted March 1, 2006 [!--quoteo(post=350803:date=Mar 1 2006, 10:10 PM:name=dmcalerney)--][div class=\'quotetop\']QUOTE(dmcalerney @ Mar 1 2006, 10:10 PM) [snapback]350803[/snapback][/div][div class=\'quotemain\'][!--quotec--]I've got this script where it does some calculations and at the end it calls itself again. In internet explorer, all of my echo statements that I'm using for debugging are showing up on the screen. They don't show up when I'm using firefox. Does anyone else know what's up with this?Thanx,Danny[/quote]It might help if you posted the offending script. Quote Link to comment Share on other sites More sharing options...
dmcalerney Posted March 1, 2006 Author Share Posted March 1, 2006 I didn't post a script because it's happining on a lot of mine. Here's a generic (and otherwise useless) example of my scripts. this is called my_script.php[code]<?phpsession_start();header("Cache-control: private");include("functions.php"); $taco = $_SESSION['taco'];$taco_count = $_SESSION['taco_count'];echo "Here is taco: $taco<br>";$taco_count++;$_SESSION['taco_count'] = $taco_count;?><html> <head> <script LANGUAGE="JavaScript"> window.location="my_script.php"; </script> --/> </head></html>[/code]In IE I'll See this:(assuming I defined taco in an earlier script)Here is taco: ChickenAnd I'd see that every time the script calls itself. But in firefox, it won't display that line.Know what I mean? Quote Link to comment Share on other sites More sharing options...
mainewoods Posted March 2, 2006 Share Posted March 2, 2006 It must be because this statement: echo "Here is taco: $taco<br>";is before your <html> tag and firefox doesn't like that. It would display in firefox if you put in a <body> tag and put it after that. What you have is basically invalid html and IE is more forgiving of invalid html. No problem with the echo statement, a problem with invalid html. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 2, 2006 Share Posted March 2, 2006 No, that's not it. I have many scripts that output debugging text before the <html> tag and they all work fine in both MSIE & FF. What's probably happening is that the output is being buffered is never getting actually written to the screen. Try using the [a href=\"http://www.php.net/flush\" target=\"_blank\"]flush[/a]() function after your debug output.Ken Quote Link to comment 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.