search

Home  >  Q&A  >  body text

看到一个例子,打开文件有写到一个rb,这个是什么意思?

$fp = fopen('./text.txt', 'rb');
while(!feof($fp)) {
    echo fgets($fp); //读取一行
}
fclose($fp);


小天小天2905 days ago3126

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 22:46:23

    I saw an example. When opening a file, an rb was written to it. What does this mean? -PHP Chinese website Q&A-I saw an example where an rb was written to a file when opening it. What does this mean? -PHP Chinese website Q&A

    Please watch and learn.

    reply
    0
  • 迷茫

    迷茫2016-12-17 14:22:33

    它是代表二进制的意思。只有r表示只读方式打开,rb表示只读方式打开一个二进制文件

    reply
    1
  • Cancelreply