Cannot see echo message but my localhost works

Posted by Sean on Stack Overflow See other posts from Stack Overflow or by Sean
Published on 2012-10-18T04:58:38Z Indexed on 2012/10/18 5:00 UTC
Read the original article Hit count: 143

Filed under:

This is my very first php code and I can't seem to get it to work. (I'm using Eclipse)

<html>
<body>
<?php

    echo 'Hello World!';
    $txt = "I <3 you!";
    $num = 19;

?>  
</html>
</body>

When I run it (http://localhost/Assignment3.0/index.php), I get:

Not Found

The requested URL /Assignment3.0/index.php was not found on this server. Apache/2.2.22 (Ubuntu) Server at localhost Port 80

But when I run this (http://localhost/), I get:

It works! This is the default web page for this server.

The web server software is running but no content has been added, yet.

So what could be the problem? Where's my "Hello World!"? Also, for Stackoverflow formatting, how do I start a new line w/o adding a blank line in between?

© Stack Overflow or respective owner

Related posts about php