I just upgraded to PHP 8.0 and everything is working except when I send my output out of the server it is just showing up as text in the browser. It is a fully formed HTML page with html, head and body tags open and closing but the browser is interpreting it as text, not HTML. Same behavior in Chrome and Safari.
I use a series of echo constructs to create the page and that works fine in anything up to 7.x. Any idea why that same approach is not working in 8.0?
Quick update, I just flipped the server back to PHP 7.0 and it is the same problem. So this is not an 8.0 issue it appears. But still an issue. And when I inspect the web page, all the code sent back shows up in the tags, so it is not recognized as a web page. Never seen this before.
Perhaps you could post some code, in case there’s something minor that you haven’t spotted. I often find a fresh pair of eyes solves all sorts of little problems.
I take it that it’s executing the PHP correctly, or is it showing that code too?
What’s also interesting is that when I “inspect” the page in Chrome, all this text above shows in the body tags with a web page formed around it.
I posted this on the HTML forum also because I’m not sure if this is a php question or an HTML question. I have always output my web pages from the php server the same way and never had an issue and can continue to do so. It is this one site where the problem occurs.
Well, for whatever reason, now it works. Suddenly. I would like to duplicate it but can’t at this point. I guess some things are just best left alone. lol Thanks for your time, it is appreciated.