i have a small function to write contents
function write($data)
{
file_put_contents("filename.txt",$data,FILE_APPEND);
}
it works good except some where when i do the following
write( var_dump($someObject) );
this gives an error message of
illegal character.
I see the this error message through an alert box in browser the php gets call through an ajax call. Any help in debugging this would be appreciated thanks.