the dreaded \
Posted: Thu Aug 03, 2006 10:13 am
i've got a textarea that submits its information to a text file, but when it submits anything with single or double quotes, php automatically puts the \ infront of the quotes. Is there a way to stop that?
I've got php pulling the textfile like this:
and submitting it using fput
it puts the file fine, just need to get rid of the /
thanks
I've got php pulling the textfile like this:
Code: Select all
<?
$filename = "home.txt";
$content_array = file($filename);
$content = implode("", $content_array);
print nl2br($content);
?>Code: Select all
<?php
$text=$_REQUEST['text'];
$filename ="../home.txt";
$myFile= fopen($filename,'w+');
$string = "$text";
fputs($myFile, $string);
fclose($myFile);
?>thanks