php write problems

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
birdie
Forum Newbie
Posts: 22
Joined: Thu Sep 15, 2005 4:37 pm

php write problems

Post 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:
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

stripslashes().. and please don't use aolspeak.
birdie
Forum Newbie
Posts: 22
Joined: Thu Sep 15, 2005 4:37 pm

Post by birdie »

aolspeak? oh and stripslashes does not get rid of all of the slashes
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I believe he's referring to talking with abbreviations like "u", "r", "OMG" and "LOL"
birdie
Forum Newbie
Posts: 22
Joined: Thu Sep 15, 2005 4:37 pm

Post 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.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

LOL we're not like the other places u have been 2
AshrakTheWhite
Forum Commoner
Posts: 69
Joined: Thu Feb 02, 2006 6:47 am

Post by AshrakTheWhite »

now that is worth the emotion of "laughing out loud" :P

:lol:
birdie
Forum Newbie
Posts: 22
Joined: Thu Sep 15, 2005 4:37 pm

Post by birdie »

lol i can tell..
Post Reply