First of all you're right, it should have been "$file", not "file".
The error message you're getting seems to be coming from the fact that fpassthru() implicitly closes the file after outputting its contents. Thus, the fclose() line is unneccessary.
As for why the contents of the file are appearing on one line, that's just Web browsers for you. If you choose View Source in your browser, you'll see that the file was actually output correctly. It's just that the Web browser is reading it as a Web page and thus flows all the lines together.
If you just want to display the contents of the file (i.e. you have no HTML elements in the page), you can tell the browser to interpret the page as a plain text file instead by adding the following line to the top of your PHP script:
Alternatively, you can surround the file's contents with <PRE>...</PRE> to preserve the end-of-lines and extra whitespace.
If neither of these options is acceptable, let me know and I'll show you the code that will read the file into a PHP variable and convert it into the HTML code neccessary to display it.