Hi!
I haven't been coding in Javascript/PHP very long, but this is the first thing some time and Google can't solve. Through my hours of debugging, I have narrowed the problem down to (unsurprisingly ) Internet Explorer. I have a HttpXML request being sent to the the file manager.php. Here is the contents of manager.php:
The url is either manager.php?sen der=0, manager.php?sen der=1, or manager.php?sen der=2. What seems to happen is that IE cannot write or read from the file. 2 simultaneous Firefox clients can read data written by the other, but IE can't read data from others, or write data itself. It DOES, however, still return the value 1 or 2 if sender = 1 or 2 respectively. This is what I don't understand. It obviously does execute that code block since it can return 1 or 2, and it works great on Firefox and Opera. My server is running Linux with Apache 2. I have been trying to figure out what is wrong with this for days. Any help would be appreciated.
Thank you!
P.S.-It has never died with that error
I haven't been coding in Javascript/PHP very long, but this is the first thing some time and Google can't solve. Through my hours of debugging, I have narrowed the problem down to (unsurprisingly ) Internet Explorer. I have a HttpXML request being sent to the the file manager.php. Here is the contents of manager.php:
Code:
<?php
/*This page manages the typing/not-typing ajax light in area.php*/
$sender=$_GET["sender"];
//Mode 1: Makes sure the file is set to "typing" (1), and then returns 1
if($sender==1)
{
$file=fopen('typing.txt', "w");
fwrite($file, 1);
fclose($file);
echo 1;
}
//Mode 2: Makes sure the file is set to "not typing" (2), and then returns 2
else if($sender==2)
{
$file=fopen('typing.txt', "w");
fwrite($file, 2);
fclose($file);
echo 2;
}
//Mode 3: Returns typing or not typing (1 or 2)
else if($sender==0)
{
$file=fopen('typing.txt', "r");
$value=fgetc($file);
fclose($file);
echo $value;
}
else
{
die("Error! Please contact your server admin!");
}
?>
Thank you!
P.S.-It has never died with that error
Comment