Internet Explorer doesn't update file
- by Leandro
Hi!
I'm using AJAX with PHP to read from a file and update the div's innerHTML.
It works on Chrome and Firefox, but not in Internet Explorer.
I tried to use:
But I think it is useless, since I'm not refreshing the page.
if(!$newMsg || $newMsg == "") { // only reading from the file
// do nothing
} else {
$fileData .= "$newMsg";
fwrite($fileHandler, "$newMsg");
}
fclose($fileHandler);
echo $fileData;
Interesting that when it enters the "else" block, it shows the file's content updated. But when it enters the "if" block, it shows the old content.