Topic: simple php question. (winxp, cli)
hi.
#!C:\php\php.exe
<?php
/* why doesn't this work on winxp? it always goes to the default case. */
echo "\nAre you going to write some cool scripts?\n";
$name = fread(STDIN, 1024);
switch ($name) {
case "yes":
echo "\nHa, you can't even get this working!";
break;
case "no":
echo "\nWhat are you, lazy?";
break;
default:
echo "\nYes or no please.";
}
sleep(2);
?>
thanks.