function name: steam_filter_preche ()
သက်ဆိုင်သောဗားရှင်း - PHP 4> = 4.3.0, PHP 5, PHP 7
function ကိုဖော်ပြချက် - stream_filter_prusthe () function ကို function ကိုသတ်မှတ်ထားသောစီးသို့ filter တစ်ခုထည့်သည်
အသုံးပြုမှု: stream_filter_preche (အရင်းအမြစ် $ stream: stream_write = stream_wilter = stream_wilter_all [, ရောနှော $ params = null]]): desirex: အရင်းအမြစ် |
Parametermer
ပြန်လာတန်ဖိုး - အောင်မြင်ပါက stream_filter_prusthe () function သည် stream stream stream အသစ်တစ်ခုကိုပြန်ပို့သည်။
ဥပမာ - ကျွန်ုပ်တို့တွင်အောက်ပါတို့ပါ 0 င်သည့် "Pegement.txt" ဖိုင်ရှိသည်ဆိုပါစို့: Hello, World!
ကျွန်ုပ်တို့သည်ဖိုင် contents တွေကိုမဖတ်မီ text ကို cotalization သို့ကူးပြောင်းခြင်းမပြုမီ filter တစ်ခုထည့်ရန် steam_filter_premefore () function ကိုသုံးနိုင်သည်။
<?php // 打开文件 $handle = fopen('example.txt', 'r'); // 添加过滤器 stream_filter_prepend($handle, 'string.toupper'); // 读取和输出文件内容 while (!feof($handle)) { echo fgets($handle); } // 关闭文件 fclose($handle); ?-->output ရလဒ်: မင်္ဂလာပါကမ္ဘာ!