Frage

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!!

War es hilfreich?

Lösung

You could use exec.

exec('/path/to/that/bash/file');

Andere Tipps

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top