I need to debug an Application, but the ECHO $variable it is not working.
How can I send the value of the variable to a log file?
Give me some clues.
Best Regards,
trigger_error in combination with error_reporting allows you to easily log what you want on development servers, without worrying about the load on your production servers.
It adds more information than error_log:
trigger_error('foo');
results in
[Fri Apr 08 14:28:08 2011] [error] [client 192.168.0.13] PHP Notice: foo in /data/sites/kai/public_html/foo.php on line 3
whereas error_log('foo');
results in
[Fri Apr 08 14:28:08 2011] [error] [client 192.168.0.13] foo
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