What is your "desired output"? Because this output looks fine to me
n_e
Junior Poster in Training
97 posts since Feb 2010
Reputation Points: 10
Solved Threads: 8
Try this:
<html>
<head>
<title>My first PHP By my own</title>
</head>
<body>
<?php
echo "My first program and its a failure";
?>
</body>
</html>
You should not have the plain text directly between the head tags. You can do in body tags. Also, you must write semi-colon ';' at the end of every PHP statements.
Zero13
Practically a Master Poster
624 posts since Jan 2009
Reputation Points: 120
Solved Threads: 139
Are you sure you've already downloaded PHP and it is properly setup on your machine ? What server are you using ? Microsoft IIS or any third-party ? I suggest to use WAMPP or XAMPP if you're windows user, you can also use MAMPP on Mac. So, check the above question. You must install and configure PHP engine on your machine first. You can download PHP manually here . Download XAMPP here .
Zero13
Practically a Master Poster
624 posts since Jan 2009
Reputation Points: 120
Solved Threads: 139
You also need any web server such Apache, etc. Go here .
Zero13
Practically a Master Poster
624 posts since Jan 2009
Reputation Points: 120
Solved Threads: 139