try { } catch (Exception $e) { echo 'Exception: ', $e->getMessage(), "\n"; }
Category: Errors
Error Handling
@function_name Prefixing a function with an @ will hide any error message generated by thefunction. If a function will possibly fail, you can prefix it with the @,then check the return value to see if the function did infact work or not.
Adding Message To PHP Error Log
bool error_log (“Some message”, 0);
Debugging PHP
Useful debugging things Debugging arrays Display errors Add “display_errors = On” in your PHP configuration file to cause errors to be displayed. This is a really useful debugging feature and is often the best first step of debuigging to determin why something isn’t working. Turning on in a file Tip: Look for a error_log file […]