V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
gouchaoer
V2EX  ›  问与答

php 的 error_log 问题

  •  
  •   gouchaoer · 2016-10-26 12:31:25 +08:00 · 1474 次点击
    这是一个创建于 2738 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我在 php-fpm 下跑 php7.0 ,然后 phpinfo 关键字段如下:
    ```
    Directive Local Value Master Value
    error_log /app/common/runtime/php_errors.log /app/common/runtime/php_errors.log
    error_prepend_string no value no value
    error_reporting 32767 32767
    ```
    然后我在 php 脚本中直接调用 error_log 来 log 一个字符串就能在 /app/common/runtime/php_errors.log 下面看到。但是我如果故意把 php 脚本写错,就不能看到 log 了,这是为啥呢?
    第 1 条附言  ·  2016-10-26 16:08:58 +08:00
    已经解决了,我 sb 了,有个 log_errors 选项默认没开,这个选项对应 display_error
    1 条回复    2016-10-26 15:48:26 +08:00
    daniellu
        1
    daniellu  
       2016-10-26 15:48:26 +08:00   ❤️ 1
    确认一下你的 php.ini 中 error 相关的设置。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1495 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:17 · PVG 01:17 · LAX 10:17 · JFK 13:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.