i am trying to save a step. when files come in we need to upload to the remote host, and then save to a PC on the local network. As it is, this involves 2 distinct steps. What i was hoping for is once the user has located the file, they, upon submit will 1) store that file to the remote server (upload), and then 2) save it to the local PC.
to simplify this a little, is there a way to use the php code to pop up a save as dialog box, direct the user to the correct folder on the local PC, and have the file name showing in the Save As dialog box, where from that point all they have to do is click 'OK'
TIA
use php to display Save As dialog and direct to right folder
Moderator: General Moderators
Re: use php to display Save As dialog and direct to right fo
You cannot specify a folder - the most you can do is give the filename.
Code: Select all
header("Content-Disposition: attachment; filename=\"filename.ext\"");Re: use php to display Save As dialog and direct to right fo
hi requinix
thanks for the reply
with this code
i get this error
thanks for the reply
with this code
Code: Select all
<? header("Content-Disposition: attachment; filename=\"filename.ext\""); ?>
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at ...
Re: use php to display Save As dialog and direct to right fo
As with all calls to header() you have to do it before you've outputted anything.