Jarid Posted January 8, 2011 Share Posted January 8, 2011 I am making a simple online html editor. I wrote a php script that prints the html that you typed in the form into a .html document. The problem is that php is replacing the parentheses with / \ /\ slashes. how do i stop this? <?php $text = $_REQUEST['HTML'] ; $test= "test.html"; $fh = fopen($test, 'w') or die("can't open file"); fwrite($fh, $text); fclose($fh); ?> Thank you Quote Link to comment https://forums.phpfreaks.com/topic/223740-php-replacing-in-variables/ Share on other sites More sharing options...
MadTechie Posted January 8, 2011 Share Posted January 8, 2011 use stripslashes, but ideally turn off magic quotes in your PHP.ini file Quote Link to comment https://forums.phpfreaks.com/topic/223740-php-replacing-in-variables/#findComment-1156520 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.