Struggling to debug PHP? Enable all errors
If you have a problem debugging any PHP code, a good first step is ensuring all errors are showing. Simply use the following code at the beginning of your script: You may find that the server you are using or the code written by somebody else is hiding too many errors for you to work…