A
A
AlexxZhuravlev72018-03-03 17:01:33
PHP
AlexxZhuravlev7, 2018-03-03 17:01:33

How do I print the date when I get an error in php?

In my shell script, a php script is periodically executed, in case of an error - I see the error itself,
but I don’t see the date when it arose - in some cases I need this information.
How can I add the date to the error output?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2018-03-03
@rPman

add a date output here:
php.net/manual/ru/function.set-error-handler.php
but be careful, this callback is called more often than you want, so adjust and check for error types.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question