Execute shell command 'dir' : System Command « Development « PHP






Execute shell command 'dir'


<?php
$dir = shell_exec("dir");
$subject = "Half-hourly file report.";
$body = "The following files are in the current directory : \n\n";
$body .= $dir;

echo $body;
?>

           
       








Related examples in the same category

1.Porter scanner
2.Ping server
3.Ping command
4.Execute help command and check its output
5.Using exec() to Produce a Directory Listing
6.Calling the man Command
7.Using popen() to Read the Output of the UNIX who Command
8.Using popen() to Pass Data to the column Application