search

Home  >  Q&A  >  body text

error_log specifies the address of the error log that cannot be saved

error_log('error_func',3,'error_log.txt');error_log.txt error log is written in, and all goes to apache/logs/error.log

1142 days ago838

reply all(4)I'll reply

  • autoload

    autoload2021-10-15 09:47:25

    image.pngI tried it and it works. Please take a look at the path where your php file is located. You can also set the error_log log directory in php.ini

    reply
    0
  • OK, thanks. Later I found out that I entered the parameter E_USER_WARNING when calling set_error_handle, and then did not enter the parameter when trigger_error, calling the default one, so the error log was not written.

    · 2021-10-15 11:38:34
  • Cancelreply