search

Home  >  Q&A  >  body text

$content = file_get_contents('./test.txt');//"./test.txt"表示么意思?

<?php
$filename = '/data/webroot/usercode/resource/test.txt';
//编写代码读取$filename的文件内容
$content = file_get_contents('./test.txt');//"./test.txt"表示么意思?
echo 'this is a test file.';
$fp = fopen('./text.txt', 'rb');
while(!feof($fp))//"!feof()"表示么意思?
 {
   echo fgets($fp); //读取一行
}
fclose($fp);


phpcn_u814phpcn_u8142922 days ago1005

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-10-01 00:25:32

    $content = file_get_contents('./test.txt');//What does "./test.txt" mean? -PHP Chinese website Q&A-$content = file_get_contents('./test.txt');//What does "./test.txt" mean? -PHP Chinese website Q&A

    Let’s take a look and learn.

    reply
    0
  • 怪我咯

    怪我咯2017-02-21 13:23:21

    "./test.txt"指的是文件的路径,用来表示这个文件在哪,怎么找到。"!feof()"检测是否已到达文件末尾

    reply
    0
  • Cancelreply