<?php
require_once('console_app.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
$app->parse_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');
?>
|