Ok, somebody told me, the archive contains the Image, only winrar seems not
to show the image, grrr.

I tried the gzip method and it did not work that fine for me.


> Sascha Braun wrote:
> > Seems to work not that bad, but I got another Question.
> >
> > Why isn't there anything in the archive?
>
> It works in here (just tested it), I don't know why it's empty (don't stop
> reading here!!! :-) )
>
> >
> > This is my code yet:
> >
> > <?
> > Header('Content-Type: application/x-tar');
> > Header("Content-disposition: attachment;
> > filename=".$_REQUEST['name'].".tar");
> > $command = 'tar -cf - ../images/' . $_REQUEST['image'];
> > passthru($command);
> > ?>
>
> Nothing wrong with this...
>
> By the way, make sure there is no newline in the second Header:
>
> Header("Content-Disposition: attachment;
> filename=".$_REQUEST['name'].".tar");
>
> I don't know if the mailingprogram breaks this line, but it's one line
(just
> in case).
>
> > I did put away the gzip routine couse I find it a little nerving if i
> > always have to open
> > two files ;)
>
> ;-))
>
> > The source pictures size is 406 KB, the download is about 340 KB in
> > size, isn't it wrong a bit?
>
> That's wrong...tar doesn't compress...a tar archive does have a small
> footprint (about 1k-2k with one file), so the tar file should ALWAYS be
> bigger than the source file(s)...
>
> Hmmmm...thinking about this...I'm sure you would like compression instead
of
> archiving. Use gzip only instead of tar:
>
> - Set the header back to application/x-gzip
> - Change the command to gzip -c <filename>
>
> I'm very curious if you get any (correct) output then...
>
> > Greetings
> >
> > Sascha
>
> Greets back :)
> Erwin
>
> > PS.: Isn't it wrong, when I write greetings in english? Sounds so
> > german, what could i write else? Thank you very much.
>
> Try "Greets" or "Thanks in advance" ;-))
> Greetings sounds (to me) more like what you say at the start of a
> conversation.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to