PHP popen() 函数

PHP 教程 · 2019-01-25 13:56:29

定义和用法

popen() 函数使用 command 参数打开进程文件指针。

如果出错,该函数返回 FALSE。

语法


popen(command,mode)


参数 描述
command 必需。规定要执行的命令。
mode 必需。规定连接模式。

可能的值:

  • r: 只读。
  • w: 只写(打开并清空已有文件或创建一个新文件)

实例


<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>


点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Producing Masculinity

Producing Masculinity

Michele White / Routledge / 2019-3 / $39.95

Thoughtful, witty, and illuminating, in this book Michele White explores the ways normative masculinity is associated with computers and the Internet and is a commonly enacted online gender practice. ......一起来看看 《Producing Masculinity》 这本书的介绍吧!

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具