View Single Post
Old 05-04-2009, 11:30 PM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
Quote:
Originally Posted by ProG View Post
Code:
Windows offers a text-mode translation flag ('t') which will transparently translate \n to \r\n when working with the file. In contrast, you can also use 'b' to force binary mode, which will not translate your data. To use these flags, specify either 'b' or 't' as the last character of the mode  parameter.
Again, that's the first time I've ever seen it in practice. Most people who expect to run multiplatform - or even on Windows, specifically, use the double-escaped-posix path and hardcode the \r\n into some of the print logic. I suppose 't' has it's place but as un-UTF as PHP can be, I'd really, really hate to allow for translation. That also explains the use of trim().

From a design standpoint - other than it since being asked for, I'm curious why you killed the pass/fail arrays - that was the only part of the code that I thought was salvageable.
__________________
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote