- Use `http_response_code` as it's a bit more robust than using `header`. - Check errors against `error_reporting()`, so that error checks can be ignored when appropriate.