简体   繁体   中英

Blank page on loading of php file

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')
?>

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');
?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM