PHP page includes garbage output
-
I’m using the Bridge Theme with a fairly complicated PHP script that calls itself depending on input parameters (via form and post method called via JS). At the top of the form is a switch list and code and then followed by many functions. So the code at the top is small compact code with many calls to functions. The script builds the page with HTML in a single variable and then does a single echo. The page comes out as expected but at the end of the HTML constructed out of the PHP script is a bunch of stuff that is a lot of the PHP script showing in text mode and then the Theme footer properly displayed.
It almost looks like the output buffer has been loaded with the some of the script used to build the page. Do you have any suggestions on how I can debug this one? The PHP script runs properly on its own outside of WordPress in a test setup.
Is there a way to place some code at the end of PHP code to wait for the output buffer to empty before letting the script end?
Any help you can offer would be much appreciated.
David S.
The topic ‘PHP page includes garbage output’ is closed to new replies.