Command line php....
| From: | John Nichel | Date: | Wed, 06 Aug 2003 03:07:35 +0000 |
| Subject: | Command line php.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-158389@lists.php.net to get a copy of this message | ||
Can someone tell me why php waits for me to input something before it prints out the first line of the code below? Shouldn't it echo out the first line then wait for my input?
#!/usr/local/bin/php
<?php
echo ( "Enter MySQL admin username : [root] " );
$username = rtrim ( fgets ( STDIN ) );
echo ( "\n\n\nThe username is...." . $username . "!!!!\n\n" );
?>