| Home
| Calendar
| Mail Lists
| List Archives
| Desktop SIG
| Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU |
Well, what happens if you print $answer?
On Fri, 28 Sep 2007, Eric Chadbourne wrote:
> I'm playing around on the command line with PHP. Anybody else here do
> that? Does it work reasonably well for simple scripts. I'm scratching
> my head on the very first attempt! Why doesn't this work? - Eric C.
>
> #!C:\php\php.exe
> <?php
>
> /* why doesn't this work on winxp? it always goes to the default case.
> */
>
> echo "\nHas Eric been drinking?\n";
> $answer = fread(STDIN, 1024);
> switch ($answer) {
> case "yes":
> echo "\nOf course he's been drinking!";
> break;
> case "no":
> echo "\nYou must be drunk!";
> break;
> default:
> echo "\nYes or no please.";
> }
> sleep(2);
>
> ?>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> Discuss mailing list
> [hidden email]
> http://lists.blu.org/mailman/listinfo/discuss
>