I work on some php project for university. Need to create simple PHP chat client. I done that but in response file that do me split of string I have this message:
I tried to change with explode() but it still gives me same error. Restarted apache and cleaned but still have same error. Can somebody tell me what is catch to solve this.
My response.php file is:
<?php
$lastreceived=$_POST['lastreceived'];
$room_file=file("room1.txt",FILE_IGNORE_NEW_LINES);
for($line=0;$line<count($room_file);$line++){
$messageArr=str_split("<!@!>",$room_file[$line]);
if($messageArr[0]>$lastreceived)echo $messageArr[1]."<br>";
}
echo "<SRVTM>".$messageArr[0];
?>