RE: fopen on windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
Blank lines. Just to see if the problem is fgets(), try this:

// Left off the "b" because it ain't binary :)
$theFile = file_get_contents( "docs/InstallationInstructionMaster.txt", 
"r" ) or die;
$lines = explode( "\n", $theFile );

foreach( $lines as $line ) {
	$line = explode( "\t", $line );
	print_r( $line );
}
[/snip]

That works, as does the following;

$lines = file('docs/InstallationInstructionMaster.txt');

foreach ($lines as $line){
   echo $line . "<br />\n";
}

So, I am perplexed. fgets() seems to have a problem of some sort. Any clues?
Not that what I want to do requires fgets(), just curious now as I will use
one of the other two methods.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux