hi frends

i'm a novice in php...

i just installed php and apache 2.2.x webserver and just wanted to try some very basic stuff...

<html>
<body>

<?php
echo "Hello world";
?>

</body>
</html>

but rather than showing the output in the browser it shows the whole code....

could nybody help me plz?

Recommended Answers

All 2 Replies

Is your file saved with a php extension?

If you have htm or html as the extension, it won't be sent to the php interpreter and will just be displayed as if it were html.

You can configure php to run in .html and .htm files.

Have you ensured that the PHP module / CGI Binary is loaded in to Apache?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.