Re: Re: Tar Files and send back to browser
| From: | Sascha Braun | Date: | Thu, 26 Sep 2002 14:28:35 +0000 |
| Subject: | Re: Re: Tar Files and send back to browser | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-117729@lists.php.net to get a copy of this message | ||
IT'S WORKING, GOOD DAMN, IT'S WORKING!
Yo, this was a really hard Job, if I look at the working snipped below!
<?
Header('Content-Type: application/x-tar');
Header("Content-disposition: filename=".$_REQUEST['name'].".tar");
$dir = explode("/", $_REQUEST['image']);
chdir('../images/'.$dir['0']."/".$dir['1']."/".$dir['2']."/");
$command = 'tar -cf - '.$_REQUEST['name'].'.jpg';
passthru($command);
?>
Ey man, this was the second Time you helped me out,
Thanks alot. You are really a great PHP Guru I believe.
So, if my page is finished you will be one of the first Persons
to watch it.
I'm really glad, that you are such an helpfull guy.
So, stay helpfull! - Untill next time.
Thanks really a lot!
Sascha
> Sascha Braun wrote:
> > Do you know how to exclude the path informations in the tar archive?
>
> Yes, first chdir to the ../images directory
> http://www.php.net/getcwd
> http://www.php.net/chdir
>
> Grtz Erwin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>