Just wondering -
When debuging PHP - how do you like to output the test data to see whats going on? I've been noticing that alot of my PHP echo testing is screwing with my CSS. Does anyone have a good clean method of seeing the results without screwing with the site itself?
You should try error_log function. It will log your debug output directly into the web server logs, and not in your page.
Another way is to echo between comments markups:
echo '<!-- This is a debug message! -->';
I like to use:
error_log("message and vars here");
It depends on the server configuration, but if you can use it, you get a nice log-file. Very useful.
Yes, use the Apache error log, if you have that kind of setup, with tail -f. Use the error_log
function found here.
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