문제

In my php code:

exec(test.sh);

and test.sh has code:

echo "Hi this is test?" | espeak --stdout > demo.wav

But nothing happen. No error, No output.

If i try to execute test.sh from terminal that it will work perfectly. So why it not run on my php.

Can someone help me?

도움이 되었습니까?

해결책

How do you run your PHP script? With php-cli (in shell mode)? HTTP (Apache, ...)?

It could be a path problem. Could you give us the path of your test.sh, the path of your php script or the URI which is called to run the PHP if you use apache or other HTTP server?

다른 팁

the apache user will need write access to the current working directory (presumably the same directory that contains your php script and test.sh).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top