Page 1 of 1

Problem with reading file

Posted: Wed Jul 03, 2002 5:38 am
by Boer
When I want to retrieve all information stored in this file part of the contents of this file is not shown. Here is the PHP I use to read the file:
<?
$datei = fopen($file,"r");
while (!feof($datei)) {
$zeile=fgets($datei,4096);
$zeile=trim($zeile);
$line = split("[\r]", $zeile);
for ($q=0; $q<count($line); $q++) {
$line[$q]=trim($line[$q]);
//here some information vanish
echo $line[$q]. "<br>";
$result = split("[ ]",$line[$q]);
$ID = $result[0];
$value = $result[1];
?>

I think my problem has something to do with the file itself... Suggestions??

Posted: Wed Jul 03, 2002 5:42 am
by twigletmac
What does the output look like?

Mac

Posted: Wed Jul 03, 2002 5:59 am
by Boer
Not good :wink:
Some of the information in the file get printed, but the most is gone..

You can try it yourself using the file in the first post. Look at the file using (note- or) wordpad and you will see how different the output is....