PHP ftell() လုပ်ဆောင်ချက်
❮ PHP ဖိုင်စနစ် အကိုးအကားဥပမာ
ဖွင့်ထားသောဖိုင်တွင် ဖတ်/ရေးညွှန်ပြချက်၏ လက်ရှိအနေအထားကို ပြန်ပေးပါ။
<?php
$file = fopen("test.txt","r");
// Print current position
echo ftell($file);
// Change current position
fseek($file,"15");
// Print current position again
echo "<br>" . ftell($file);
fclose($file);
?>
အဓိပ္ပါယ်နှင့် အသုံးပြုမှု
ftell() လုပ်ဆောင်ချက်သည် အဖွင့်ဖိုင်တစ်ခုရှိ read/write pointer ၏ လက်ရှိအနေအထားကို ပြန်ပေးသည်။
အထားအသို
ftell(file)
ကန့်သတ်တန်ဖိုးများ
Parameter | Description |
---|---|
file | Required. Specifies the open file to check |
နည်းပညာဆိုင်ရာအသေးစိတ်
ပြန်ပို့တန်ဖိုး- | ဖိုင်ညွှန်ပြသည့် အနေအထား သို့မဟုတ် ပျက်ကွက်မှုတွင် မှားနေသည်။ |
---|---|
PHP ဗားရှင်း- | 4.0+ |
❮ PHP ဖိုင်စနစ် အကိုးအကား