[英]How to pass parameters to sh file with php?
I'm executing this command: 我正在执行以下命令:
exec('sh myFile.sh paramater1')
But in myFile.sh
, how to get parameter1
? 但是在
myFile.sh
,如何获取parameter1
呢?
I didn't find any information about it 我没有找到任何相关信息
The command line parameters in shell are referenced as $1
, $2
, and so forth. shell中的命令行参数被引用为
$1
, $2
等。
As a side note: 附带说明:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.