Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
CMD を使用して、次を使用して同時に 2 つのコマンドを実行できます。
command1 | command2
PHPでは、うまくいくはずだと思っていましたが、うまくいきません:
Shell_exec("command1 | command2 ");
どうすれば修正できますか?
波括弧を追加してみてください:
shell_exec("(command1 | command2)");
で I/O リダイレクトを行う PHP ドキュメントにコメントがありpopenます。
popen
;コマンドの代わりに試すことができ|ます。php.net でこのコメントを参照します。
;
|