Results 1 to 2 of 2

Thread: How can I see the error message when page is loaded?

  1. #1
    Join Date
    Aug 2011
    Posts
    10
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default How can I see the error message when page is loaded?

    Hello,
    In my code, I create a php file by using the contents of a textarea that is used for trying PHP code.
    If the php file has no syntax errors, it is loaded in the bwowser very well. But if it has syntax error(s) in it (i.e. writing ech instead of echo), I see a white page. But, instead of a white page I want the user to see the related error message (in this case "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\tez\test.php on line 4").
    If anyone can help me to solve this problem, I will be very happy.
    Thank you.

  2. #2
    Join Date
    Mar 2007
    Location
    Dublin, Ireland
    Posts
    23
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    I assume you added error_reporting(E_ALL) to your primary PHP file, so I'd say you should include the textfile as PHP. It should be able to echo your errors.

    Hopefully it'll work for you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •