/2.0/Tests/FileSystem/fgets.php
# · PHP · 15 lines · 14 code · 1 blank · 0 comment · 2 complexity · 3ed659d51c20619fb208366f26abc902 MD5 · raw file
- [expect php]
- [file]
-
- <?php
- include 'fs.inc';
- $handle = fopen("test.txt", "rt");
- if ($handle)
- {
- while (!feof($handle)) {
- $buffer = fgets($handle, 4096);
- echo htmlspecialchars($buffer);
- }
- fclose($handle);
- }
- ?>