if ($argc != 2 || in_array($argv[1], array('--help', '-help', '-h', '-?'))) {
?>This is a command line PHP script with one option. Usage:
<?php echo $argv[0]; ?> <option> <option> can be some word you would like
to print out. With the --help, -help, -h,
or -? options, you can get this help.<?php
} else {
echo $argv[1];
}
?>This is a command line PHP script with one option. Usage:
<?php echo $argv[0]; ?> <option> <option> can be some word you would like
to print out. With the --help, -help, -h,
or -? options, you can get this help.<?php
} else {
echo $argv[1];
}
a.php
运行方式
script.php -h不知道你是不是说的这个?
比如取名
a.php
运行方式
script.php -h
什么意思?
script.php是什么文件?
然后运行a.php -h
你有没有用SAPI 模块???????????
这是服务器端编程 用CLI模式不是CGI模式
你先把CLI搞清楚再说,ok?或者在a.php上加一行
#!/usr/bin/php
php a.php就可以了。