-4

The following simple code produces a blank page.

<?php

namespace aname;

echo "Hello world";

?>

Why?

ndm
  • 59,784
  • 9
  • 71
  • 110
CRISHK Corporation
  • 2,948
  • 6
  • 37
  • 52

2 Answers2

1

I had the same problem just now. The solution was to convert the php-file encoding to UTF-8 without BOM.

You can read about it here: Fix incorrectly displayed encoding on an html document with php and here: How to fix "Headers already sent" error in PHP

Community
  • 1
  • 1
RomanGP
  • 25
  • 6
0

Most likely, you haven't actually installed PHP, or at least not correctly. Make sure that it's in your C:\ drive and that you followed the instillation instructions. If you used the installer, then try uninstalling then reinstalling and it should fix itself

Peace!

  • 1
    If you read the comments, then you'll notice that the OP is receiving PHP parser errors, so PHP _is_ installed. I'm 99.9% confident that the OP simply has an outdated PHP version in use as already mentioned by @Leggendario. – ndm May 30 '15 at 13:45