Log 500 errors to a file

You might be familiar with the dreaded blank page when your PHP script doesn't work.

Here's how to spit out errors to the screen, instead of getting just a blank page, as well as logging errors to a file.