concatenate files?

concatenate files?

am 20.01.2008 20:56:43 von grande news

is there any way to concatenate files in PHP?

thanks
B

Re: concatenate files?

am 20.01.2008 21:27:20 von Jerry Stuckle

Bint wrote:
> is there any way to concatenate files in PHP?
>
> thanks
> B
>
>
>

Please clarify what you're asking. Are you wanting to concatenate two
files on disk? If so, you can open one for reading and one for append.
Then read the first in, writing to the second as you go.

Or, better yet, open a new file for writing. Open the first file for
reading and write it to the new file. Then open the second input file
for reading and write to the new file.

Of course there are other ways to do it, also - i.e. using system functions.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Re: concatenate files?

am 21.01.2008 17:20:08 von Virginner

"Bint" wrote in message
news:13p79rtq7feasd1@corp.supernews.com...
> is there any way to concatenate files in PHP?
>

fopen and use the "a" mode.