shell_exec() - execute shell command using php file

by Nirmala 2010-04-07 12:28:09

shell_exec()
This function is used to execute a shell command via PHP file. It returns complete output as a string.
Example:
<?php
$output = shell_exec('ls -lart');
echo "
$output
";
?>

The above code will list the permissions of the file, user of the file, owner of the file, size of the file, date of creation and filename.

Tagged in:

1325
like
0
dislike
0
mail
flag

You must LOGIN to add comments