[英]running several commands using php's shell_exec
I've tried for a while now every way possibly known to me, and have yet to crack this thing, it's probably very trivial but couldn't find the answer. 我已经尝试了一段时间,现在我可能知道的每一种方式,并且还没有破解这个东西,它可能非常微不足道但是找不到答案。
I want to run several commands at once using php shell_exec, for example shell_exec("cd ..; dir")
but I am unable to find how to execute a few commands, what is the seperator? 我想使用php shell_exec一次运行几个命令,例如
shell_exec("cd ..; dir")
但我无法找到如何执行一些命令,什么是分隔符? is it ;, is it /n? 是吗,是吗? nothing seems to work.
似乎没什么用。
Please note I am running with windows. 请注意我正在运行Windows。
https://superuser.com/a/62854 https://superuser.com/a/62854
&&
will execute command 2 when command 1 is complete providing it didn't fail,&
will execute regardless.&&
将执行命令2时,命令1是完全提供它没有失败,&
无论将执行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.