elgoog Posted October 13, 2008 Share Posted October 13, 2008 Nothing seems to be outputting after a comment I have stripped everything out of my file and just inserted the following. I am stumped on what to try next. <? // comment echo "testing"; ?> Does anyone know what is going on? Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/ Share on other sites More sharing options...
trq Posted October 13, 2008 Share Posted October 13, 2008 You might want to try using <?php tags. Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664332 Share on other sites More sharing options...
F1Fan Posted October 13, 2008 Share Posted October 13, 2008 Looks OK, but you should really have <?php rather than just <?. Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664334 Share on other sites More sharing options...
elgoog Posted October 13, 2008 Author Share Posted October 13, 2008 Tried with the full tag, doesn't seem to make a difference. Also tried wiping out the contents of my .htaccess just in case, but no luck Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664342 Share on other sites More sharing options...
Stooney Posted October 13, 2008 Share Posted October 13, 2008 Your php install might be bad. Try a different browser (just a random idea) or print() in place of echo and see what happens. Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664346 Share on other sites More sharing options...
F1Fan Posted October 13, 2008 Share Posted October 13, 2008 Is that the entire contents of the file? Also, try: <?php echo "before"; // comment echo "after"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664347 Share on other sites More sharing options...
Maq Posted October 13, 2008 Share Posted October 13, 2008 Try this to make sure: // comment echo "testing"; print "testing"; die(); ?> If not f4, reinstall. Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664348 Share on other sites More sharing options...
elgoog Posted October 13, 2008 Author Share Posted October 13, 2008 <?php echo "before"; // comment echo "after"; ?> coming out with Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in index2.php on line 1 Need to get in touch with host? Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664352 Share on other sites More sharing options...
Stooney Posted October 13, 2008 Share Posted October 13, 2008 Are you sure that's all that's in the file? If so, try removing the <?php tag and see what happens. (Guessing kinda) Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664357 Share on other sites More sharing options...
Maq Posted October 13, 2008 Share Posted October 13, 2008 Yeah, this is a little too weird... And if you take the comment out it works?! Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664361 Share on other sites More sharing options...
revraz Posted October 13, 2008 Share Posted October 13, 2008 What editor are you using? Maybe there is some hidden chars there, open it with Notepad and see. Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664364 Share on other sites More sharing options...
elgoog Posted October 13, 2008 Author Share Posted October 13, 2008 Ha.... Pasted in Notepad and saved and its works. weird thing is the file was working on local, but not when i FTP'ed it. So did not even think it would be the editor PSpad must be throwing in something wierd in there. Thanks for the help everyone. what a waste of the past couple hours i have had trying to fix! Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664375 Share on other sites More sharing options...
redarrow Posted October 13, 2008 Share Posted October 13, 2008 try this it free http://notepad-plus.sourceforge.net/uk/site.htm Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664383 Share on other sites More sharing options...
elgoog Posted October 13, 2008 Author Share Posted October 13, 2008 Cheers for the link. Looks like a good app. Will give it a shot especially after tonights episode! Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664387 Share on other sites More sharing options...
revraz Posted October 13, 2008 Share Posted October 13, 2008 Did you upload it in Binary or Ascii? Quote Link to comment https://forums.phpfreaks.com/topic/128268-solved-no-output-after-comment/#findComment-664403 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.