Domanda

I have automated my error_reporting process. Errors are logged to a file and periodically sent via email.

Problem is I don't get enough information. E.g. I can see a undefined index notice; but I can't see where it was triggered as often its an included file.

Is it possible to get a dump of $_SERVER in the error log?

È stato utile?

Soluzione

What I would do is to catch errors using this then log my custom error using this

Altri suggerimenti

You can use function debug_backtrace

Function return backtrace for current position.

For Include $_SERVER to email you can use print_r($_SERVER, true); but I think this can help you little.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top