RE: [PHP] slashes added before '
| From: | John Holmes | Date: | Wed, 25 Sep 2002 12:20:53 +0000 |
| Subject: | RE: [PHP] slashes added before ' | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117558@lists.php.net to get a copy of this message | ||
Use stripslashes() on the text before you write it to the file. Where is
this text coming from? The slashes are probably getting added by
magic_quotes.
---John Holmes...
> -----Original Message-----
> From: Khalid El-Kary [mailto:khalid_kary@hotmail.com]
> Sent: Wednesday, September 25, 2002 8:08 AM
> To: php-general@lists.php.net
> Subject: [PHP] slashes added before '
>
> this code snippet:
>
> function save($file)
> {
> $my_file=fopen($file,"wb");
> $my_status=fwrite($my_file,$text);
> fclose($my_file);
> }
>
> is intended to overwrite a file or create a file and write to it from
a
> string that's already containing text.
>
> the problem is the after the script writes the file i find "\" before
all
> single and double qoutes in the whole file
>
> this problem occured on red hat linux but in windows it didn't happen.
>
> can any one help?
>
> khalid
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php