<?php
// Use fopen function to open a file
$file = fopen("test.txt", "r");
// Read the file line by line until the end
while (!feof($file)) {
$value = fgets($file);
print $value . "<br>";
}
// Close the file that no longer in use
fclose($file);
?>
<?php
// Use fopen function to open a file
$file = fopen("test.txt", "r");
// Read the file line by line until the end
while (!feof($file)) {
$value = fgets($file);
print $value . "<br>";
}
// Close the file that no longer in use
fclose($file);
?>
請先 登入 以發表留言。