小白教程
所有教程
关于
Search
172.70.178.58
172.70.178.58
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Func filesystem popen”的源代码
本页内容
上一节:
Func_filesystem_pclose
下一节:
Func_filesystem_readfile
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:popen()}}[[Category:PHP Filesystem 文件系统参考手册|61]] = PHP popen() 函数 = [[Category:PHP Filesystem 文件系统参考手册]] == 定义和用法 == popen() 函数使用 command 参数打开进程文件指针。 如果出错,该函数返回 FALSE。 == 语法 == <pre> popen(command,mode) </pre> {| class="table table-striped table-hover" !width="50%"| 参数 !width="50%"| 描述 |- | command | 必需。规定要执行的命令。 |- | mode | 必需。规定连接模式。 可能的值: * r: 只读。 * w: 只写(打开并清空已有文件或创建一个新文件) |} <sample title="" desc="" lang="php" hererun="1"> <?php $file = popen("/bin/ls","r"); //some code to be executed pclose($file); ?> </sample> [[Category:PHP Filesystem 文件系统参考手册]]
返回至“
Func filesystem popen
”。
上一节:
Func_filesystem_pclose
下一节:
Func_filesystem_readfile