I am try to add a javascript using php as follows
<?php
Header("content-type: application/x-javascript");
$serverIP=$_SERVER['REMOTE_ADDR'];
echo "document.write(\"Your IP address is: <b>" . $serverIP . "</b>\")";
?>
Here i need to print my output as follows
Your IP address is: 127.0.0.1
but it is showing result like
document.write("Your IP address is: <b>127.0.0.1</b>").
i am using apache server in ubuntu.What is wrong with me. help me please...