php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4435 when you use the fwrite(file, string) function, it puts "\"s before any ' or "
Submitted: 2000-05-13 04:46 UTC Modified: 2000-05-13 08:29 UTC
From: daniele at dcs dot it Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Release Candidate 2 OS: Linux Slackware 7.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: daniele at dcs dot it
New email:
PHP Version: OS:

 

 [2000-05-13 04:46 UTC] daniele at dcs dot it
/* the following is the content of a <textarea></textarea> HTML tag */

/*	this (") and this(') give some trouble	*/

/* if the textarea name is $body, I do something like this : */

$ofile=fopen("/tmp/tempfile", 'w');
fwrite($ofile, $body);

/* when i go and read $ofile, it utputs like this : */

this (\") and this(\') give some trouble

/*
	It happens both with RC1 and RC2.
	I used to work with php-3.0.12, I updated the software on the server
	to both the latest versions, but I had to installa 3.0.12 back!
	Any Idea?

	bye

		Daniele

*/






Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-13 08:29 UTC] sterling at cvs dot php dot net
This is the expected behavior when magic quotes is enabled.  Either disable magic quotes
or use the stripslashes function.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 13:01:33 2025 UTC