PHP popen () ฟังก์ชัน
ความหมายและการใช้งาน
popen () ฟังก์ชันใช้พารามิเตอร์คำสั่งเพื่อเปิดแฟ้มชี้กระบวนการ
หากเกิดข้อผิดพลาดการทำงานกลับ FALSE
ไวยากรณ์
popen(command,mode)
参数 | 描述 |
---|---|
command | 必需。规定要执行的命令。 |
mode | 必需。规定连接模式。 可能的值:
|
ตัวอย่าง
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
เสร็จสมบูรณ์คู่มือการใช้งานระบบแฟ้ม PHP อ้างอิง