F
First N
Guest
I've been using the following php code:
<?php
$string = $HTTP_GET_VARS["string"];
$file = fopen('log.txt', 'a');
fwrite($file, $string . "\n\n");
?>
To write to a txt file "log.txt" where "string" is a value I have sent using javascript. However this code only writes the first part of the string and then cuts off, from some experimentation sending examples to it using javascript it seems like it is cutting out after a semicolon ';' in the string.
I have tried removing the semicolons by adding:
$trimmed = trim($string, ";");
and then writing $trimmed, but the same result is given. Help with this would be greatly appreciated.
<?php
$string = $HTTP_GET_VARS["string"];
$file = fopen('log.txt', 'a');
fwrite($file, $string . "\n\n");
?>
To write to a txt file "log.txt" where "string" is a value I have sent using javascript. However this code only writes the first part of the string and then cuts off, from some experimentation sending examples to it using javascript it seems like it is cutting out after a semicolon ';' in the string.
I have tried removing the semicolons by adding:
$trimmed = trim($string, ";");
and then writing $trimmed, but the same result is given. Help with this would be greatly appreciated.