<?php
/*

//命令行输入输出流
fwrite(STDOUT,"Enter your name:");


$name = trim(fgets(STDOUT));


fwrite(STDOUT,"hello,$name");
*/
echo $argc;


if ($argc > 1){
print_r($argv);
}

?> 

 另存为 ./test.php

[root@xiuran test]# php  ./test.php xxx fdf

3Array
(
    [0] => test.php
    [1] => xxx
    [2] => fdf
)

相关文章:

  • 2021-07-15
  • 2021-11-08
  • 2022-12-23
  • 2021-12-19
  • 2021-12-06
  • 2022-12-23
  • 2021-12-03
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
相关资源
相似解决方案