PHP fnmatch() လုပ်ဆောင်ချက်
❮ PHP ဖိုင်စနစ် အကိုးအကားဥပမာ
အခွံ သင်္ကေတပုံစံနှင့် ဆန့်ကျင်ဘက် အရောင်အမည်ကို စစ်ဆေးနေသည်-
<?php
$txt = "My car is a dark color";
if (fnmatch("*col[ou]r",$txt))
{
echo "hmm...";
}
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
fnmatch() လုပ်ဆောင်ချက်သည် string သို့မဟုတ် ဖိုင်အမည်သည် ပေးထားသော shell wildcard ပုံစံနှင့် ကိုက်ညီမှုရှိမရှိ စစ်ဆေးပါသည်။
အထားအသို
fnmatch(pattern, string, flags)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
pattern | Required. Specifies the shell wildcard pattern |
string | Required. Specifies the string or file to check |
flags | Optional. Can be one or a combination of the following:
|
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အောင်မြင်မှုအပေါ် သစ္စာ၊ ကျရှုံးမှုတွင် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | 4.3+ |
PHP Changelog- | PHP 5.3- Windows ပလပ်ဖောင်းများတွင် ယခုရရှိနိုင်ပါပြီ။ |
❮ PHP ဖိုင်စနစ် အကိုးအကား