Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP Runs In WinXP Command Window But Not In Browser

Skip to first unread message

Peter Lauren

unread,
Apr 2, 2011, 4:15:03 PM4/2/11
to
I am using Windows XP have installed WAMP and PHP as outlined here
http://www.wampserver.com/en/
and have set my search path so that I need only type
php -f PHPExamples.php
and the PHP code runs fine. However, I have not managed to get it to
run in my FireFox/3.5.9 browser. When I make a simple file with the
following contents

<html>
<body>

<?php
$txt1="Hello World!";
$txt2="What a nice day!";

echo $txt1 . " " . $txt2 . " " . strlen("Hello world!") . " " .
strpos("Hello world!","world");
?>

</body>
</html>

, name it Examples.php and call it with a button thus
<a href="Examples.php">PHP</a>

I just get a blank page.

I would be grateful if someone could tell me what I am doing wrong.

Thanks,
Peter.

0 new messages