I am using the php method getTraceAsString() which will pring out my error messages like:
#0 /var/www/wordpress/wp-content/themes/Aisis-Framework/AisisCore/Template/Builder.php(147): AisisCore_Template_Builder->_render_template_array(Array, 'navigation') #1 /var/www/wordpress/wp-content/themes/Aisis-Framework/index.php(3): AisisCore_Template_Builder->render_view('navigation') #2 /var/www/wordpress/wp-includes/template-loader.php(47): include('/var/www/wordpr...') #3 /var/www/wordpress/wp-blog-header.php(16): require_once('/var/www/wordpr...') #4 /var/www/wordpress/index.php(17): require('/var/www/wordpr...') #5 {main}
As you can see is one giant string. The example they gave prints out the trace as separate lines. is there something I have to do to get that?
It's a string with line breaks, not HTML. Look at the source code of your page.
Either wrap the output in <pre></pre>
tags or replace the line break with HTML line breaks.
preg_replace("/\n/", '<br>', $trace);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With