PHP chdir() လုပ်ဆောင်ချက်
ဥပမာ
လက်ရှိလမ်းညွှန်ကို ပြောင်းပါ-
<?php
// Get current directory
echo getcwd() . "<br>";
// Change directory
chdir("images");
// Get current directory
echo getcwd();
?>
ရလဒ်:
/home/php
/home/php/images
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
chdir() လုပ်ဆောင်ချက်သည် လက်ရှိလမ်းညွှန်ကို ပြောင်းလဲသည်။
အထားအသို
chdir(directory)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
directory | Required. Specifies the new current directory |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | အောင်မြင်မှုအပေါ် သစ္စာရှိပါ။ ရှုံးနိမ့်မှုအပေါ် မှားသည်။ အဆင့် E_WARNING ၏ အမှားအယွင်းကို ပျက်ကွက်မှုတွင် လွှင့်ပစ်သည်။ |
---|---|
PHP ဗားရှင်း- | 4.0+ |
❮ PHP လမ်းညွှန်အကိုးအကား