PHP die() လုပ်ဆောင်ချက်
ဥပမာ
မက်ဆေ့ချ်ကို ပရင့်ထုတ်ပြီး လက်ရှိ ဇာတ်ညွှန်းကို အဆုံးသတ်ပါ-
<?php
$site = "https://www.w3schools.com/";
fopen($site,"r")
or die("Unable to connect to $site");
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
die() function သည် exit() function ၏ alias တစ်ခုဖြစ်သည်။
အထားအသို
die(message)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
message | Required. A message or status number to print before terminating the script. A status number will not be written to the output, just used as the exit status. |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ဘာမှမဖြစ် |
---|---|
PHP ဗားရှင်း- | 4+ |
❮ PHP Misc အကိုးအကား