PHP popen() လုပ်ဆောင်ချက်
❮ PHP ဖိုင်စနစ် အကိုးအကားဥပမာ
command parameter တွင်ဖော်ပြထားသောပရိုဂရမ်သို့ပိုက်တစ်ခုဖွင့် ပါ-
<?php
$file = popen("/bin/ls","r");
//some code to be executed
pclose($file);
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
popen() လုပ်ဆောင်ချက်သည် command parameter တွင် သတ်မှတ်ထားသော ပရိုဂရမ်သို့ ပိုက်တစ်ခုကို ဖွင့်ပေးသည်။
အထားအသို
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 ဖိုင်စနစ် အကိုးအကား