I can't get the following code to work correctly:
<html>
<head>
<title>test</title>
</head>
<body>
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "<h1>" . $ip . "</h1>";
?>
</body>
</html>
It outputs this:
" . $ip . ""; ?>
But when I create a php file and throw the php into it I get the result I want:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "<h1>" . $ip . "</h1>";
?>
Result:
(My IP Address)