-5

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

1

3 Answers 3

1

You could use exec.

exec('/path/to/that/bash/file');
Sign up to request clarification or add additional context in comments.

Comments

1

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;

Comments

1

shell_exec or exec can help you. Read more at http://us.php.net/exec

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.