>
> If he wants to download, in the file downloadit.php, there is:
> header("Content-type: application/octet-stream\n");
> header("Content-Disposition: attachment; filename=mysoft-1.0-truc.zip");
> header('Cache-Control: public');
> header("Content-transfer-encoding: binary\n");
> header("Content-length: " . filesize($path) . "\n");
> $fp=fopen($path, "r");
> fpassthru($fp);
>
> But, with IE, it saves the file with [] as:
> mysoft-1.0[1]-truc.zip
> And with Netscape 7.x, it saves the file with the .php extension:
> mysoft-1.0-truc.zip.php
>
> Does anyone know what to do to make it saved as: mysoft-1.0-truc.zip
>
> And I would like to display a page telling "Thanks for download" or
> something...but if I had to the end:
> header("Location: http://www.mywebsite.com/thanks.html";) ;
> I does not work :(
>
> Does anyone know how change the location and is there is anyway to know
> if the download has been perfomed 'till the end...
>
> Thanks,
> Vincent.

There is no way to tell if the download completes, I don't think, that is
a client side thing that if you send the content-length header it should
know if the file downloaded successfully or not, the browser does not send
a "success" signal back. Also, if you put quotes around the filename in
the Content-Disposition header, it will save the file with the exact
filename you specify, the RFC doesn't specifiy that it has to be this way,
but I have found that putting quotes around it makes it work for pretty
much any browser I have tried.

For your other problems, I would deconstruct them one by one and try and
get a piece of it working and then put the pieces together, it sounds like
you are trying to get too much done in one pass and it is causing you
problems.

Cheers,

Slide

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

Reply via email to