Re: magical file writing truncation
| From: | skate | Date: | Fri, 08 Aug 2003 11:38:03 +0000 |
| Subject: | Re: magical file writing truncation | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-158804@lists.php.net to get a copy of this message | ||
> [snip]
> $newFile = "xml/".$type."/".$now.".xml";
> while(file_exists($newFile))
> $newFile = "xml/".$type."/".$now++.".xml";
> $text = $_POST['text'];
> $text = urlencode(stripslashes(nl2br($text)));
> [/snip]
>
> At this point (for testing putposes) I would echo "$text"; and start
> looking for clues. If I were a betting man I would have to say that
> there is some problem with quotes within the text. I hope that this
> points you in the right direction.
been doing some more testing. $text seems to stay intact throughout, it is
exactly what it should be. if i do an fwrite( $fp, $text ) then it writes
perfectly all contents of the $text as i would expect. i shouldn't get any
problems with quotes or other characters as the whole lot is urlencode()'d
> Have a pleasant and fruitful day!
wow, everyone on this list should be THAT cheery :) thanks mate, you too!