1

I have a Url and file name also when i dial Url file downloads in window's Default folder "Downloads" butt i want to download that file in specific folder set by me.

is there any possibility to download file in specific folder with php code??

Mudi
  • 9
  • 6

2 Answers2

3

If you mean another folder on client's machine (who is downloading the file) then no, you can't.
It would be a security issue if you (I mean your application, on server side) can choose a destination on client's machine as target for file downloads.

Nima
  • 3,309
  • 6
  • 27
  • 44
  • Nima there is no solution to solve this issue. because i want to download file from a url and save it on my server' folder?? – Mudi Aug 04 '17 at 07:59
  • @Mudi if you want to save a file on a server, just rephrase your question and check other answers that already solved that – Edwin Aug 04 '17 at 08:02
  • Ok Edwin, Actually i am trying this on localhost therefore i asked this – Mudi Aug 04 '17 at 08:05
  • Are you the one who is "sending the file" or the one who is "downloading" it? If your PHP code is sending the file to a client then you have no control over their choice for download destination. Please give me a little more details. – Nima Aug 04 '17 at 08:05
  • @Nima i am downloading the file and want to download it in my specific directory. – Mudi Aug 04 '17 at 09:34
  • "https://files.podio.com/395416889" when i dial this url a file downloads which i want to move in my given folder name "public_html/podioapi/abc" – Mudi Aug 04 '17 at 10:19
  • @Nima Thanks alot – Mudi Aug 04 '17 at 12:45
0

So you want to set a default download directory on the client side. You can only suggest to change the default download directory in the browser settings (firefox or chrome, i don't know for other browsers) for security reasons.

gimperman
  • 1
  • 1