|
Posted by Jay Blanchard on 11/11/05 23:23
[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.
[Back to original message]
|