Page 1 of 1

php write problems

Posted: Wed Jun 21, 2006 10:25 am
by birdie
hi, i have a problem when i try and write html to a file. This is probably easy but i usually mess with db's..

file.php has this when written..

Code: Select all

<META HTTP-EQUIV=Refresh CONTENT=\\\\\'0; URL=forum/\\\\\'>
as u can see, \'s are in which i can use..

Code: Select all

$handle = fopen($location, 'w') or die("Cannot complete my dutys");
$data = '<META EQUIP SOME HTML></a>';
fwrite($handle, $data);
fclose($ourFileHandle);
any functions which will prevent this?
thanks alot :smile:

Posted: Wed Jun 21, 2006 10:35 am
by feyd
stripslashes().. and please don't use aolspeak.

Posted: Wed Jun 21, 2006 10:42 am
by birdie
aolspeak? oh and stripslashes does not get rid of all of the slashes

Posted: Wed Jun 21, 2006 10:52 am
by Luke
I believe he's referring to talking with abbreviations like "u", "r", "OMG" and "LOL"

Posted: Wed Jun 21, 2006 2:10 pm
by birdie
personally i havent seen any forums which mind about one 'u' in a post as it is no where near as bad as OMG or anything like that.

Posted: Wed Jun 21, 2006 2:11 pm
by Luke
LOL we're not like the other places u have been 2

Posted: Wed Jun 21, 2006 2:16 pm
by AshrakTheWhite
now that is worth the emotion of "laughing out loud" :P

:lol:

Posted: Wed Jun 21, 2006 2:49 pm
by birdie
lol i can tell..