doufei16736 2012-04-11 09:30
浏览 259
已采纳

PHP - error_reporting不起作用

My webhosting provider doesn't offer the option to enable error reporting. So tried it with error_reporting(E_ALL); But this also doesn't work. I tried the following script:

 <?php
 error_reporting(E_ALL);
 echo $test;
 ?>

If I read the manual correctly, then this should generate an error notice. But this also doesn't work. Did I make something wrong or is the only solution to get a new webhosting provider?

  • 写回答

4条回答 默认 最新

  • doushan1850 2012-04-11 09:32
    关注

    error_reporting is just telling PHP how verbose the error reporting should be, but you also need to tell it to actually display errors out to the browser by setting

    ini_set('display_errors', 1);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 目详情-五一模拟赛详情页
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b