0

When I go to load this in the browser, nothing is displayed. If I comment out the last line it works fine. I thought that if the last line was causing some type of error it would be reported, rather than nothing happening.

<?php ini_set('display_errors',1); error_reporting(E_ALL); echo "hello" $xml = simplexml_load_file(dirname(__FILE__).'/svn_log.xml') ?> 
4
  • 1
    Missing two ending/closing semi-colons. The one for echo "hello" is the most important one. Commented Mar 11, 2014 at 19:17
  • 1
    if you had error checking and display ON you would see the error and not a blank page. Commented Mar 11, 2014 at 19:23
  • as best I can tell I've turned them on. it's apache hosted so I went in and changed the php.ini file so they would be on Commented Mar 11, 2014 at 19:24
  • what does phpinfo() say? Commented Mar 11, 2014 at 19:30

1 Answer 1

5

Missing two ending/closing semi-colons.

The one for echo "hello" is the most important one.

It's good practice to finish all lines with semi-colons.

<?php ini_set('display_errors',1); error_reporting(E_ALL); echo "hello"; $xml = simplexml_load_file(dirname(__FILE__).'/svn_log.xml'); ?> 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.