This is my sample Hello World program. Which din’t work with .html extension but it is working with the . php extension.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<div>
<?php echo 'Hello World!!' ?>
</div>
</body>
</html>
Is it possible to save this file with .html extension? and is it true that some of the browsers doesn’t support .php files?
PHP is server side languages it has nothing with browser image below explain how php works
Image source and good read
Normally use just
.phpextension