surreal5335
02-17-2012, 05:56 PM
I am trying change a file with name exactly the same as a email address. Just meaning to add a small snippet of text to it via ajax call with jquery .get().
So far it works great in Chrome and FF but IE9 is not working file_put_contents() function only, Ajax fires no problem.
Another oddity is that after doing the file_put_contents() in IE9, I imediatly do a file_get_contents to check if the message was sent successfully. IE9 returns the message I want it to save, but inspecting the file itself shows nothing has changed!?
Here is my code:
$emailFileName = trim($email);
$status = 'new message';
$filePutResult = file_put_contents($emailFileName, $status);
echo $emailFileName.'\'s status has been set to: '.$status.' ...and this many bytes were written to the file: '.$filePutResult.'<br />';
$fileGetResult = file_get_contents($emailFileName);
echo $emailFileName.'\'s status really is: '.$fileGetResult;
Any thoughts? I appreciate the help
So far it works great in Chrome and FF but IE9 is not working file_put_contents() function only, Ajax fires no problem.
Another oddity is that after doing the file_put_contents() in IE9, I imediatly do a file_get_contents to check if the message was sent successfully. IE9 returns the message I want it to save, but inspecting the file itself shows nothing has changed!?
Here is my code:
$emailFileName = trim($email);
$status = 'new message';
$filePutResult = file_put_contents($emailFileName, $status);
echo $emailFileName.'\'s status has been set to: '.$status.' ...and this many bytes were written to the file: '.$filePutResult.'<br />';
$fileGetResult = file_get_contents($emailFileName);
echo $emailFileName.'\'s status really is: '.$fileGetResult;
Any thoughts? I appreciate the help