php - shell_exec() 如何选择使用哪个 shell?

标签 php

这个问题出现在另一个线程中。想到我会问。

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/

相关文章:

PHP 从字符串中获取整数

javascript - 使用javascript从html中删除div

php - 是否有可用的 XSLT 到 C++ 编译器?

php - php 中一个函数是否可以返回 2 个或多个不同数据类型的值?

php - 在PHP中打印YouTube视频供稿

PHP/MySQL - 如何添加多个标签

php - 系统生成的电子邮件退回

php - 在执行基本 SELECT 操作时,您的 SQL 语法有错误

java - Android Studio 没有与我的 PHP 脚本通信

php - 这个编码叫什么?