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;

Comment and Contribute

Your comment has been submitted and is pending approval.

Jiju Thomas Mathew



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