LoginSignup
3
4

More than 5 years have passed since last update.

コマンドの実行結果をPHPで出力する。

Last updated at Posted at 2016-03-26
exec.php
<?php
$command='ls -ltr';
  $output=array();
  $ret=null;
  exec ( $command, $output, $ret );
  //各行を<br>付きで出力する。
  foreach ($output as $line){
    print $line."<br>\n";
  }
?>

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4