ID: 38589
User updated by: tennysonvarghese at gmail dot com
Reported By: tennysonvarghese at gmail dot com
-Status: Closed
+Status: Bogus
Bug Type: *General Issues
Operating System: Debian linux 2.6.15-1-686
PHP Version: 4.4.4
New Comment:
ok
Previous Comments:
------------------------------------------------------------------------
[2006-08-25 11:47:20] tennysonvarghese at gmail dot com
i'm sorry.. i understand its not a bug..
i turn off the magic quotes and now its alright..
magic_quotes_gpc = Off
------------------------------------------------------------------------
[2006-08-25 11:46:38] [EMAIL PROTECTED]
Not PHP problem -> bogus.
------------------------------------------------------------------------
[2006-08-25 11:38:55] tennysonvarghese at gmail dot com
thanks for the help.. i put off the magic quotes as you suggest.. now i
get the solution
------------------------------------------------------------------------
[2006-08-25 08:56:45] [EMAIL PROTECTED]
Turn off magic_quotes.
------------------------------------------------------------------------
[2006-08-25 08:24:39] tennysonvarghese at gmail dot com
Description:
------------
fwrite() prepends '\' if is there any '," or \ . PHP tries to write a
'\' for every inclusion of the above characters.
Reproduce code:
---------------
<form name="frmFile" method="post" action="test.php">
<textarea name="txtFile" rows=5>
<?= $_POST['txtFile']; ?>
</textarea>
<input type = submit value="Test" >
</form>
<?php
if(isset($_POST['txtFile'])){
$data = $_POST['txtFile'];
fwrite($fp, $data);
fclose ($fp);
}
?>
Expected result:
----------------
i expect to remove the extra slash('\') and get the file as what i
write in the text area.
Actual result:
--------------
this is \\\\\\\'\\\\\\\' test \\\\\\\\
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38589&edit=1