Bash File Script- PHP [duplicate]
题
Possible Duplicate:
Problem executing bash file
I have created a bash file script and stored in some directory. Now I need to create a php script to execute this bash script so anyone can help me!!
解决方案
You could use exec.
exec('/path/to/that/bash/file');
其他提示
Function exec gets executes script and with additional parameter it collects output from script.
$output = '';
exec("/path/to/your/bash/script.sh", &$output);
echo $output;
shell_exec or exec can help you. Read more at http://us.php.net/exec
不隶属于 StackOverflow