Keannylen
Keannylen

Reputation: 483

Why I can not embed my php code in html code

Sorry guys this is probably pretty simple, but i've been up way too late now. I have a basic html page and when i try to put any php in the body it reads it as a comment.

<html>
<body>
.... ....
</p>
</div>
<div id='result' class='ui-widget' style='width:70%;margin:0 auto'>
</div>
</div>
<?php 
include(WEB_ROOT.'/template/footer.php'); 
?>

</body>
</html>

Is there anything wrong?

Upvotes: 0

Views: 103

Answers (2)

Anass
Anass

Reputation: 6270

Problem of extension ! .PHP not .HTML ! The opposite is correct ! including html in php page

Upvotes: 0

Cydonia7
Cydonia7

Reputation: 3826

You must use a server like Apache which interprets the page. What's more, it should have a .php extension.

Upvotes: 1

Related Questions