发布于 2023-11-11 14:11:53 浏览 162 次
$fileData = file_get_contents('filename.txt');
echo $fileData;
$file = fopen('filename.txt', 'r');
$fileData = fread($file, filesize('filename.txt'));
fclose($file);
echo $fileData;
$file = fopen('filename.txt', 'r');
while (!feof($file)) {
echo fgets($file) . "<br>";
}
fclose($file);