Can any one exploit my below code :-
$myfile = fopen("chat.txt", "a") or die("Unable to save!");
$content = trim($_POST['message'])."\n";
fwrite($myfile, $content);
fclose($myfile);
I am making small chat application where, i am writing content in text
file rather than mysql
. There is not much performance change, but i am preferring file
as it is little faster than mysql
.
My only concern is , "Can any one exploit" above code ?
I don't see any way, but Just asking, If i am missing anything.