php html file writing
Posted: Wed Aug 29, 2007 7:10 pm
I have this php script:
I am using it to write specified messages to an html file.
I am trying to use give it the string
Code: Select all
<?php
if (!$_GET['message']){exit("no chat posted!");}
$message=$_GET['message'];
$filecont=file_get_contents("chat.html");
$file=fopen('chat.html','w');
fwrite($file,$message.'<br>'.$filecont);
fclose($file);
echo "chat sent";
?>I am trying to use give it the string
but it writes this to the file:<img src='/emotes/frown.gif' width='22' height='22'>
and then I using<img src=\'/emotes/frown.gif\' width=\'22\' height=\'22\'>
but i get<font color='#080808'>
<font color=\'\\<br>