Location: PHPKode > scripts > Console App > console-app/hello.php
# set the app
$app = &new console_app();
$app->set_app_desc("This is a famous Hello World console app.");

# set some command line parameters
$app->define_arg('name','n','','your name');

# don't forget to parse the command line to get args

# get the value of 'name' like this
$name = $app->get_arg('name');
if( $name =='' )
  $name = $app->read("enter your name");

# display a hello msg
$app->msg("Hello $name",'blue'); 
Return current item: Console App