A lesser known trick is that mod_php maps stderr to the Apache log. And, there is a stream for that,

so file_put_contents('/path/to/file.log', $foo . PHP_EOL, FILE_APPEND);; will nicely dump the value of $foo into the Apache error log.

 

转自: http://stackoverflow.com/questions/6079492/how-to-print-a-debug-log

相关文章:

  • 2021-05-06
  • 2021-12-23
  • 2022-02-27
  • 2022-02-09
  • 2021-12-31
  • 2022-12-23
  • 2021-10-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案