shell_exec
(PHP 4, PHP 5)
shell_exec --
シェルによりコマンドを実行し、文字列として出力全体を返す
説明
string
shell_exec ( string cmd )
この演算子は、バックティック演算子と同じで
す。
例 1. shell_exec()の例
<?php $output = shell_exec('ls -lart'); echo "<pre>$output</pre>"; ?>
|
|
exec() および
escapeshellcmd()も参照ください。