这个问题出现在另一个线程中。想到我会问。
Shell Script Loop from PHP not working
最佳答案
如果它使用 popen()
,使用 /bin/sh
在 Linux 上。 popen()
的手册页说:
The command argument is a pointer to a null-terminated string containing a shell command line. This command is passed to /bin/sh using the -c flag; interpretation, if any, is performed by the shell.
/bin/sh
是 POSIX 保证可用的唯一 shell。
关于php - shell_exec() 如何选择使用哪个 shell?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16826223/