各位大侠:
  怎么用PHP写个日志出来啊?功能要像LOG4J那样的

解决方案 »

  1.   

    写文件好了。
    file_put_content('./log.txt','error msg',FILE_APPEND);
      

  2.   

    编辑  php.ini 设置display_errors = Off
    log_errors = On
    error_log = /var/log/php-error.log
      

  3.   

    我的意思是用PHP写个日志记录
      

  4.   

    参照log4j的写就是了,要什么功能自己写呗,
    日志记录全部可配置.
      

  5.   

    别人作好的东西可以拿来用
    你可以分析一下log4php
    这和log4j 是同一个架构,只是用php实现的,log4php现在也是apache的项目