jaytyn Posted October 27, 2016 Share Posted October 27, 2016 Hi all, I have a wierd problem I cannot solve. Whenever (ANY) php code uses the T_OBJECT_OPERATOR function ( -> ) the ">" causes the PHP code to exit and returns to HTML. So thefefore any code after the ">" is displayed as HTML text. Any ideas? It doesn't matter what code I use, as soon as the -> is in PHP, it exits and returns to HTML. Only on 1 server. The other server works fine, so I'm guessing its a module or something that isnt loaded? Thanks Jay Quote Link to comment https://forums.phpfreaks.com/topic/302419-t_object_operator-exiting-code/ Share on other sites More sharing options...
ginerjm Posted October 27, 2016 Share Posted October 27, 2016 (edited) Only one server? I'd guess (a big WAG) that it is the .ini file on that installation. Check the setting for short tags. I know that it can be enabled or disabled, but perhaps there is another setting to re-define what that short tag is. Perhaps someone else will weigh in on this soon. Just for grins, can you post some code that does this? Edited October 27, 2016 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/302419-t_object_operator-exiting-code/#findComment-1538679 Share on other sites More sharing options...
ginerjm Posted October 27, 2016 Share Posted October 27, 2016 On second thought - I take back my postulation. Show us some code that gives you this problem. Maybe 20-30 lines leading up to it and the EXACT error message and line number and (please) point out what line of code it is. Quote Link to comment https://forums.phpfreaks.com/topic/302419-t_object_operator-exiting-code/#findComment-1538681 Share on other sites More sharing options...
Jacques1 Posted October 28, 2016 Share Posted October 28, 2016 Are you sure that the PHP code before the operator is executed? What you describe sounds more like the entire file is interpreted as HTML. Open the page source code in the browser to check, don't just look at the rendered content. 2 Quote Link to comment https://forums.phpfreaks.com/topic/302419-t_object_operator-exiting-code/#findComment-1538686 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.