Re: fwrite() blank-line Quirk?
| From: | Jason Wong | Date: | Mon, 23 Dec 2002 04:37:29 +0000 |
| Subject: | Re: fwrite() blank-line Quirk? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129138@lists.php.net to get a copy of this message | ||
On Sunday 22 December 2002 13:52, Noel Wade wrote:
> Hi All,
>
> Relatively new PHP coder (was in an MS / ASP shop before)... I'm doing
> some flat-file manipulation (please, spare me the database comments, I'm
> working on it!), and I'm having to read strings out of one file and copy
> them into another until a while() condition is satisfied.
>
> The problem is, I seem to always end up with a blank line at the end of my
> files (which then screws up later file-processing) - I'm assuming because
> of the \n that fwrite() appends to the end of each string...
fwrite() only writes what you tell it to write ...
> Is there a simple way to get rid of this blank line or somehow get fwrite()
> to NOT put a newline on the end of a string?
... so it must be your code which is putting it there? Please post your code.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
A rock pile ceases to be a rock pile the moment a single
man contemplates it, bearing within him the image of a cathedral.
-- Antoine de Saint-Exupery
*/