Internet Explorer doesn't update file

Posted by Leandro on Stack Overflow See other posts from Stack Overflow or by Leandro
Published on 2010-05-12T17:22:17Z Indexed on 2010/05/12 17:24 UTC
Read the original article Hit count: 138

Filed under:
|
|
|
|

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.

© Stack Overflow or respective owner

Related posts about php

Related posts about file