PHP rename() လုပ်ဆောင်ချက်
❮ PHP ဖိုင်စနစ် အကိုးအကားဥပမာ
လမ်းညွှန် + ဖိုင်ကို အမည်ပြောင်းပါ
<?php
rename("images","pictures");
rename("/test/file1.txt","/home/docs/my_file.txt");
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
rename() လုပ်ဆောင်ချက်သည် ဖိုင် သို့မဟုတ် လမ်းညွှန်ကို အမည်ပြောင်းသည်။
အထားအသို
rename(old, new, context)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
old | Required. Specifies the file or directory to be renamed |
new | Required. Specifies the new name for the file or directory |
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.3.1- Windows ရှိ drives များတစ်လျှောက် ဖိုင်များကို အမည်ပြောင်းခွင့်ပြုပါ။ PHP 5.0- အချို့သော URL ထုပ်ပိုးမှုများနှင့် အသုံးပြုနိုင်သည်။ |
❮ PHP ဖိုင်စနစ် အကိုးအကား