...

View Full Version : Backslashes?



the-dream
03-15-2007, 07:32 PM
hi,

i have this code...


<?php


chmod("index.html", 0777) or die('Could Make File Writeable!');
$html = $_POST['profile'];
$File = "index.html";
$Handle = fopen($File, 'w') or die('Could not open file!');
fwrite($Handle, $html) or die('Could Not Write!');
fclose($Handle) or die('Could Not Save');

echo "Profile Saved";


?>

... and i want is to strip the backslashes using stripslashes();

However i have no idea how this is done. I have tried a nuber of time with a number of different ways but it still writes the html file with backslashes???

Any Suggestions?

Thanks,
~ Christian ( the-dream )

Inigoesdr
03-15-2007, 07:37 PM
$html = stripslashes($_POST['profile']);
or

fwrite($Handle, stripslashes($html)) or die('Could Not Write!');

koyama
03-15-2007, 07:37 PM
$html = stripslashes($_POST['profile']);

Beaten to it

the-dream
03-15-2007, 07:38 PM
thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum