Home >Web Front-end >HTML Tutorial >Web page download link_html/css_WEB-ITnose
html a
I beg you, I am new to web pages and want to make a download link. I use the tag to download an image (imgs/1.img). I tried Create another page [B], and then send a parameter to [B] to display the sent parameter. But this can probably be achieved. Use dynamic language [JSP/ASP/PHP].This is a problem with the browser, hahahaha,,,,,, some browsers download the
header( 'Content-Type: application/octet-stream');
When outputting in the background, set the http response header and then directly output the file stream
You can also set the MIME setting of the image file in your web service. application/octet-stream'
But then all your pictures will be downloaded
I think it may be difficult for beginners to solve this problem. There are many things to be related
Above 2 You can think of this as a keyword and search for specific usage
Create another page [B], and then send a parameter to [B] to let it display the sent Parameters. This can be achieved, but probably using a dynamic language [JSP/ASP/PHP]. Can you write one for me to use as a reference?
header('Content-Type: application/octet-stream');
When outputting in the background, set the http response header and then directly output the file stream
You can also set the MIME setting of the image file in your web service to application/octet-stream '
But then all your pictures will be downloaded
I think it may be difficult for beginners to solve this problem. There are a lot of things to be related
You can see the above 2 methods Search for specific usage by yourself. Where should I place this header?
Take a look at this book [JSP]: "Twenty-Four Lessons to Master JAVA WEB"
19.5. 1 Scenario Application 1??The real path of hidden file download
Check it out in other languages.