John Hart
John Hart

Reputation: 67

PHP will not render in browers

The followind code will not render on Firefox or Safari (OS X & MAMP) I have googled all afternoon but am new to web programming and I am more confused than when I started.

<html>
<head>
    <title>Hello World!</title>
</head>

<body>
    <h1>Examples</h1>

    <?php echo "Hello World!"; ?>

    <br />

</body>

In Safari it displays the above code and Firefox asks what to do with it.

I suspect I need to set some options in Apache but definately need help. Thank you

Upvotes: 2

Views: 3049

Answers (2)

Mohammad Saberi
Mohammad Saberi

Reputation: 13166

put these lines of code at the first line of you file, and check the error or warning you get.

error_reporting(E_ALL);
ini_set('display_errors', '1');

Then tell me the result. I hope you can find out what is the problem.

Upvotes: 1

quux
quux

Reputation: 918

You need to configure apache conf file. Check this http://www.petefreitag.com/item/516.cfm or this http://php.net/manual/en/install.windows.apache2.php

Upvotes: 0

Related Questions