ID:               38589
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tennysonvarghese at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         *General Issues
 Operating System: Debian linux 2.6.15-1-686
 PHP Version:      4.4.4
 New Comment:

Turn off magic_quotes.


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to