Using <?php tag but not visible in browser - SOLVED.
Posted by: Goe (---.rochd2.qld.optusnet.com.au)
Date: May 04, 2006 08:40AM

How do I see php coded text in my browser? I'm trying to follow this tutorial (I have WAMP5 installed);
What do they mean 'place it on a PHP enabled server.."? I thought having WAMP5 running did that...
.......................................
PHP and HTML Code:
<html>
<head>
<title>My First PHP Page</title>
</head>
<body>
<?php
echo "Hello World!";
?>
</body>
</html>

Display:
Hello World!
If you save this file and place it on PHP enabled server and load it up in your web browser, then you should see "Hello World!" displayed. If not, please check that you followed our example correctly.
..........................................

Wherever you go, there you are



Post Edited (05-04-06 12:28)

Options: ReplyQuote
Re: Using
Posted by: Goe (---.rochd2.qld.optusnet.com.au)
Date: May 04, 2006 12:26PM


Solved. A trap for young players. Didn't realise that;

-pages MUST be viewed by selecting 'localhost' from the WAMP menu. This will open in your browser. You then drill down to the folder that contains the *.php file you want.
FILES in the site ROOT folder will NOT be displayed. *.php files MUST be in a subfolder of the root site folder.

This is not obvious to thick newbies such as my good self.


Options: ReplyQuote


Sorry, only registered users may post in this forum.