shell_exec() - execute shell command using php file - PHP Views : 318
Tagged in : PHP
0 0
Send mail
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.
By Nirmala, On - 2010-04-07



    Login to add Comments .