You are here: RE: [PHP] fopen on windows « PHP « IT news, forums, messages
RE: [PHP] fopen on windows

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация