Is it possible to pass an array as a command line argument to a PHP script?

前端 未结 9 887
忘掉有多难
忘掉有多难 2020-12-09 16:37

I\'m maintaining a PHP library that is responsible for fetching and storing incoming data (POST, GET, command line arguments, etc). I\'ve just fixed a bug that would not all

9条回答
  •  生来不讨喜
    2020-12-09 16:41

    You need to figure out some way of encoding your array as a string. Then you can pass this string to PHP CLI as a command line argument and later decode that string.

提交回复
热议问题