وظيفة PHP popen ()
❮ مرجع نظام ملفات PHPمثال
افتح أنبوبًا للبرنامج المحدد في معلمة الأمر :
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
التعريف والاستخدام
تفتح وظيفة popen () أنبوبًا إلى البرنامج المحدد في معلمة الأمر.
بناء الجملة
popen(command, mode)
قيمه المعامل
Parameter | Description |
---|---|
command | Required. Specifies the command to execute |
mode | Required. Specifies the connection mode. Can be "r" (Read only) or "w" (Write only - opens and clears existing file or creates a new file) |
تفاصيل تقنية
قيمة الإرجاع: | خطأ في الفشل |
---|---|
إصدار PHP: | 4.0+ |
❮ مرجع نظام ملفات PHP