PHPBuilder - User input in php command line



RSS Twitter
Tips Application Architecture

User input in php command line

by: Jiju Thomas Mathew
|
February 15, 2007

The following piece of code will help capture user input when writing command line php scripts.

 function getInput($msg){
          fwrite(STDOUT, $msg: );
          $varin = trim(fgets(STDIN));
          return $varin;
   }
http://www.php-trivandrum.org

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Jiju Thomas Mathew

Comment:



Comment:

(Maximum characters: 1200). You have characters left.