2010年02月17日 phpから外部プログラム(シェル)を実行した際の出力結果を全て取る system関数を使っていましたが、linuxでシェルを実行するのと、挙動が違ったので出力結果をすべて取りたいと思った時、shell_execを見つけました。 //使い方は以下そのまま $res = shell_exec('ls'); systemだと最終行しか取れなかったのですが、ちゃんとすべて取得できました。 説明によるとbacktick 演算子の別名らしいです。 「PHP」カテゴリの最新記事
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く