dqj96395 2015-01-23 15:06
浏览 58
已采纳

WebPage无法访问更换错误[关闭]

I have a weird problem when i have an error in my php code my webpage just display webpage inaccessible but not the errors. I have change my php init file by:

error_reporting  =  E_ALL & E_NOTICE & E_STRICT

but it don't change anything

  • 写回答

1条回答 默认 最新

  • doupoji3856 2015-01-23 15:40
    关注

    You are using the wrong operator here. Your line will only dispalay errors of type E_ALL and E_NOTICE and E_STRICT. Since an error can not match all three types, none is shown.

    Use the or operator | to include something or the and-not operatr `~&' to exclude something from E_ALL.

    error_reporting (E_ALL | E_NOTICE | E_STRICT);
    

    If you are talking about the settings in your php.ini, use this documentation:

    ; Common Values:
    ;   E_ALL (Show all errors, warnings and notices including coding     standards.)
    ;   E_ALL & ~E_NOTICE  (Show all errors, except for notices)
    ;   E_ALL & ~E_NOTICE & ~E_STRICT  (Show all errors, except for notices and coding standards warnings.)
    ;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
    ; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
    ; Development Value: E_ALL
    ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
    ; http://php.net/error-reporting
    error_reporting = E_ALL
    

    Warning: If you are specifying your error levels somewhere else, ex an apache config, use the numbers behind those constants and NOT the constants!

    http://php.net/manual/de/errorfunc.configuration.php#ini.error-reporting

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧