<?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);
数据分析师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.