PHP script doesn't show up !

Hi Everyone,
On my desktop I activated XAMPP server as seen on the attached screenshot.
I named my HTML file:“test.html” and wrote the following code:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>test</title>
	</head>
<body>
aa
<?php
echo "Hello World!";
?>
</body>
</html>

At Chrome browser’s address line I wrote:

http://localhost/test.html
On my display appeared the page as follows:
aa
Which means that the page itself was loaded but the PHP script was ignored ! I can't figure out why PHP code is ignored ! Can anyone hrlp me with that? Thanks !

Your server isn’t set up to parse html files with PHP (which it normally shouldn’t be). Change the file extension to .php

Thanks a lot ! I did as you said and it works fine.

Thank you JIMl

Sponsor our Newsletter | Privacy Policy | Terms of Service