我不太确定这个术语存在于哪个级别,但是在php-framework Laravel中,有一个名为Artisan的命令行工具,用于创建cronjob。(也称为命令)。您可以像这样指定参数和选项:
/**
* Get the console command arguments.
*
* @return array
*/
protected function getArguments()
{
return array(
array('example', InputArgument::REQUIRED, 'An example argument.'),
);
}
/**
* Get the console command options.
*
* @return array
*/
protected function getOptions()
{
return array(
array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),
);
}
这两者有什么不同?
https://stackoverflow.com/questions/17837368
复制相似问题