Ive been using this code to read text files into <TEXTAREA>'s
$filename = "scores.txt";
$fileContent = file($filename);
$fileContent = implode("", $fileContent);
$fileContent = htmlentities($fileContent);
print "<textarea rows='20' cols='70' name='fileContent' wrap='virtual'>$fileContent</textarea>\n";
print "<input type='hidden' name='filename' value='$filename'>\n";
on unix machines, and an NT4 machine with IIS and PHP 4.2.2
On my new NT4 server with Apache 1.3.27/PHP 4.2.2 Im trying to run a PHP script with this same code and instead of reading my scores file into the box as:
Score1:0
Score2:0
Score3:0
it reads it in as:
Score1:0
Score2:0
Score3:0
WHY are these blank lines in between appearing? This has never happened before
Also, when I use my Save code to write any changes ive made, the lines in between are Doubled
Heres my save code:
$file = fopen($filename, "w");
$fileContent = stripslashes($fileContent);
fwrite($file, $fileContent);
fclose($file);
echo "Scores have been updated successfully.";
Any help would be appreciated
Thanks