Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $fp = fopen("file.txt", "r");
- if ($fp) {
- while (($buffer = fgets($fp, 4096)) !== false) {
- echo $buffer;
- }
- if (!feof($fp)) {
- echo "Error: unexpected fgets() fail\n";
- }
- fclose($fp);
- } else {
- echo "file access error";
- }
- ?>
Add Comment
Please, Sign In to add comment