Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

This is my php script-

<?php
  error_reporting(E_ALL);
  echo('catch this -> ' ;. $thisdoesnotexist);
?>

Which obviously should show something if it were to be executed.

All I see is an empty page. Why is error_reporting(E_ALL) not working?

<?php
  ini_set("display_errors", "1");
  error_reporting(E_ALL);
  echo('catch this -> ' ;. $thisdoesnotexist);
?>

Does not help either. All I get is an empty page.

I've been to php.ini and set display_errors = On and display_startup_errors = On. Nothing happens.

question from:https://stackoverflow.com/questions/16933606/error-reportinge-all-does-not-produce-error

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
319 views
Welcome To Ask or Share your Answers For Others

1 Answer

Your file has syntax error, so your file was not interpreted, so settings was not changed and you have blank page.

You can separate your file to two.

index.php

<?php
ini_set("display_errors", "1");
error_reporting(E_ALL);
include 'error.php';

error.php

<?
echo('catch this -> ' ;. $thisdoesnotexist);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...