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 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站