|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-25 08:56 UTC] tony2001@php.net
[2006-08-25 11:38 UTC] tennysonvarghese at gmail dot com
[2006-08-25 11:46 UTC] tony2001@php.net
[2006-08-25 11:47 UTC] tennysonvarghese at gmail dot com
[2006-08-25 11:48 UTC] tennysonvarghese at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 20:00:01 2025 UTC |
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 \\\\\\\\