Re: PHP HTML text editor issues...

From: Date: Wed, 18 Aug 2004 16:44:52 +0000
Subject: Re: PHP HTML text editor issues...
Groups: php.general 
Request: Send a blank email to php-general+get-194166@lists.php.net to get a copy of this message
Do you have magic quotes turned on in your php ini file? Jason Tim Traver <tt-list@simplenet.com> wrote: > > Hi all, > > ok, I've made my own version of a file manager complete with a text editor, > and I'm having troubles figuring out some issues. > > I present the text to be edited retrieved from a file in a textarea box for > a user to edit, and then POST that to my PHP application, which then saves > it to disk. > > I have found it to break when the text file has intentional backslashes in > it. For instance, if you are editing a perl script, there are a lot of > times where you need lots of backslashes in a row. > > Does the POST data get urlencoded as it is coming in to the program, and > then PHP unencodes it to put it in the variable ? It seems that there is > some kind of translation. > > I've tried to use addslashes and stripslashes to prevent some of the > clobbering of the text, but it doesn't seem to be working. If I don't do > anything, it looks like PHP (or HTML) backslashes all quotes... > > I just want to get the EXACT text that is in the textarea to be saved to > disk... > > Here is an example of a line that gets clobbered : > > $value =~ tr/\0//d; > > I read the file in from disk using file_get_contents. Does that do any > translation ??? > > Any help would be appreciated, > > Tim. > > > > > > SimpleNet's Back ! > http://www.simplenet.com >

« previous php.general (#194166) next »