如何从img标签自动下载图像到本地?

I have this:

<img id ="saveimage" src="image.php<?php echo $finalRequest; ?>" alt="Barcode Image" />

How to achieve that make auto download the image to local from this img tag? Thanks!!

duandai2178
duandai2178 您想在点击时下载它吗?或者在访问该页面时自动下载?
7 年多之前 回复

1个回答

Put <a> tag on the image and point it to the folder where it is located, then add a .htaccess to force download the file, google how to do it via .htaccess..

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐