Bolmazov Posted July 27, 2009 Report Share Posted July 27, 2009 Привет. Допустим есть ссылка <a href='files.jpg'>Скачать</a>Как сделать так, что бы файл по ссылке скачивался? Quote Link to comment Share on other sites More sharing options...
0 s0rr0w Posted July 27, 2009 Report Share Posted July 27, 2009 Привет. Допустим есть ссылка <a href='files.jpg'>Скачать</a>Как сделать так, что бы файл по ссылке скачивался?Веб-сервер какой? Quote Link to comment Share on other sites More sharing options...
0 Bolmazov Posted July 27, 2009 Author Report Share Posted July 27, 2009 Apache Quote Link to comment Share on other sites More sharing options...
0 s0rr0w Posted July 27, 2009 Report Share Posted July 27, 2009 Переопределить mime type для данного расширения данной директории, установить какой-нибудь application/octet-stream Quote Link to comment Share on other sites More sharing options...
0 Bolmazov Posted July 27, 2009 Author Report Share Posted July 27, 2009 Можно чуть по подробнее? Пожалуйста. Quote Link to comment Share on other sites More sharing options...
0 rus Posted July 27, 2009 Report Share Posted July 27, 2009 Посмотри здесь, может и найдешь то что ищешь... Quote Link to comment Share on other sites More sharing options...
0 Bolmazov Posted July 27, 2009 Author Report Share Posted July 27, 2009 Окэ. А вот с такой стороны можно подойти? )))Отослать header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=downloaded.pdf");Только что-то не могу понять где прописать адрес файла который нужно скачать... ))) Quote Link to comment Share on other sites More sharing options...
0 s0rr0w Posted July 27, 2009 Report Share Posted July 27, 2009 Окэ. А вот с такой стороны можно подойти? )))Отослать header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=downloaded.pdf");Только что-то не могу понять где прописать адрес файла который нужно скачать... )))Это php. Но, как по мне, лучше справиться простыми средствами веб-сервера. Quote Link to comment Share on other sites More sharing options...
0 Dimitry Wolotko Posted July 27, 2009 Report Share Posted July 27, 2009 Не каждый виртуальный сервер это позволит, так что лучше на PHP - так надёжней что ли. Quote Link to comment Share on other sites More sharing options...
0 rus Posted July 27, 2009 Report Share Posted July 27, 2009 Не каждый виртуальный сервер это позволит, так что лучше на PHP - так надёжней что ли.Полностью согласен. Quote Link to comment Share on other sites More sharing options...
0 s0rr0w Posted July 27, 2009 Report Share Posted July 27, 2009 Не каждый виртуальный сервер это позволит, так что лучше на PHP - так надёжней что ли.Но мы то не знаем, какая ситуация у вопрошающего.... Quote Link to comment Share on other sites More sharing options...
Question
Bolmazov
Привет. Допустим есть ссылка <a href='files.jpg'>Скачать</a>
Как сделать так, что бы файл по ссылке скачивался?
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.