If you are having problems with PHP not recognizing the line endings when reading files either on or created by a Macintosh computer, you might want to enable the auto_detect_line_endings run-time configuration option.
?php $fd = fopen ("/ tmp / inputfile.txt", "r"); while (!feof($fd)) {$buffer = fgets($fd, 4096); echo $buffer;} fclose ($fd);?