文件名为:test.php
#!/usr/bin/php -q
<?
echo "this is test!/n/n";
echo "please check this program!/n/n";
echo "文件名为:{$argv[0]}/n/n";
echo "你传入的参数是:{$argv[1]}/n";
?>
./test.php 'hello world'
文件名为:test.php
#!/usr/bin/php -q
<?
echo "this is test!/n/n";
echo "please check this program!/n/n";
echo "文件名为:{$argv[0]}/n/n";
echo "你传入的参数是:{$argv[1]}/n";
?>
./test.php 'hello world'