01-09-2010, 07:28 PM
|
#21 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,324
Thanks: 5
|
Having been shown the source file being used, the problem is due to the line endings. The file uses Macintosh style line endings ( \r only) rather than the more usual Unix ( \n) or Windows ( \r\n) endings. Because of this, PHP guessed (wrongly) that the entire file was only one super-long line.
Thankfully, you can instruct PHP to take a peek around the file and discover the true line ending character(s) for a file being read by setting the configuration option auto_detect_line_endings to 1 (it is 0, i.e. off, by default). In your script, before you try to read the file, just set that configuration option:
PHP Code:
ini_set('auto_detect_line_endings', '1');
Well, that looks to be the problem anyway. 
|
|
|
|