PHP unlink() လုပ်ဆောင်ချက်
❮ PHP ဖိုင်စနစ် အကိုးအကားဥပမာ
ဖိုင်တစ်ခုကိုဖျက်ပါ
<?php
$file = fopen("test.txt","w");
echo fwrite($file,"Hello World. Testing!");
fclose($file);
unlink("test.txt");
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
unlink() လုပ်ဆောင်ချက်သည် ဖိုင်တစ်ခုကို ဖျက်သည်။
အထားအသို
unlink(filename, context)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to delete |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အောင်မြင်မှုအပေါ် သစ္စာ၊ ကျရှုံးမှုတွင် မှားသည်။ |
---|---|
PHP ဗားရှင်း- | 4.0+ |
PHP Changelog- | PHP 5.0 - ဆက်စပ် ကန့် သတ် ဘောင်ကို ထည့်ထားသည်။ |
❮ PHP ဖိုင်စနစ် အကိုးအကား