On 08/03/07, Gordon Stewart <[EMAIL PROTECTED]> wrote:
>
>
> Thanks - Will do a bit of research (& check what version of PHP I have
> (I know a simple phpinfo() will work)...
>
> BUT :-
>
> $zip->addFromString('test.txt', 'file content goes here');
>
> I could 'create' my new updated jabascript file - & store it as a
> value - & add it like this :-
>
> $zip->addFromString('custom.js', '$custom');
>
> with $custom holding all the HTML / Javascript code from the updated js
> file...
>
> Seems easy :)
>
> (Is that how it works)....
>
> --
> G
> NZ community groups - [EMAIL PROTECTED]
> Freecycle Auckland :-
> http://groups.yahoo.com/group/AucklandFreecycle/
If your new "file" is being made as a string then yes, that would work
and there's no need to save the "file" to disk first, although you
don't want to use single quotes around $custom else you'll make a file
with literally $custom in it ;o)
Don't forget you can have as many files as you should like in the zip
file, so you can make your files separately too (i.e. a html file and
a js file and ...)
Enjoy!
Phill