Here�s a simple way to execute the windows dir or the linux ls in PHP Windows: <?php $row = exec(dir,$output,$error); while(list(,$row) = each($output)){ echo $row, "<BR> "; } if($error){ echo "Error : $error<BR> "; exit; } ?> Linux: <?php $row = exec(ls -ls,$output,$error); while(list(,$row) = each($output)){ echo $row, "<BR> "; } if($error){ echo "Error : $error<BR> "; exit; } [�]
Here�s a simple way to execute the windows dir or the linux ls in PHP
Windows:
<?php
$row = exec(dir,$output,$error);
while(list(,$row) = each($output)){
echo $row, "<BR> ";
}
if($error){
echo "Error : $error<BR> ";
exit;
}
?>
Linux:
<?php
$row = exec(ls -ls,$output,$error);
while(list(,$row) = each($output)){
echo $row, "<BR> ";
}
if($error){
echo "Error : $error<BR> ";
exit;
}
?>