且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Shell运行/执行带参数的php脚本

更新时间:2023-12-05 12:46:22

test.php:

print_r($argv);

Shell:

$ php -q test.php foo bar
Array
(
    [0] => test.php
    [1] => foo
    [2] => bar
)