Re: rtf....I knew it couldn't be this easy
| From: | gamin | Date: | Mon, 30 Dec 2002 21:10:52 +0000 |
| Subject: | Re: rtf....I knew it couldn't be this easy | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129712@lists.php.net to get a copy of this message | ||
"Edward Peloke" <epeloke@echoman.com> wrote in message
news:NFBBIIKNALMFFNANEKEFMEGNDCAA.epeloke@echoman.com...
> Ok,
>
> I took a word document, saved it as an rtf then opened the document in a
> text editor so that I could see all the rtf code. I then added this code
to
> my script
> $fp=fopen("documents\off.rtf",w);
> $outputstring="";
> fwrite($fp, $outputstring);
>
> For the outputstring, I simply cut and paste the rtf code. I do not get
any
> errors but when I open the new file I created, there are blank lines
between
> each line of rtf code and when it is opened in word, it shows all the rtf
> code. Is there something else I should do....I knew it couldn't be this
> easy.
>
> I tried escaping all the characters in the string such as /,;,{ but that
> didn't work either.
Try opening the file in binary mode. Look at fopen()
HTH
gamin.