From: alain >From the manual - Last thing to read ;) >"Note: The mode may contain the letter 'b'. This is useful only on systems >which differentiate between binary and text files (i.e. Windows. It's >useless on Unix). If not needed, this will be ignored. "
If UNIX system doesn't difference between binary and text files, how are for ex 'char *fgets()' respectively 'char *gets()' supposed to be working then? When opening a file in binary mode (b) Unix and MS Windows behaves more or less the same, on the other hand when opening a file in text write mode (w or a) then UNIX might differ from MS Windows. I've noticed that MS VC++ appends an ctrl-Z on the end of text files while writing to them. If Borland C++ does the same, I don't know. But as far as my limited knowledge extends, neither CC, cc, gcc or g++ does in this behavior. Conclusion: Opening a file in binary mode works more or less the same on UNIX and Windows, but text mode works different on the both systems. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php