English 中文(简体)
如何实施内容分配:附件?
原标题:How to implement Content-Disposition: attachment?

我正试图这样做,以便通过点击来下载第3号标语,而不必进行点击和拯救,因为为了做到这一点,我必须确定内容——分层:附件。 这是我的第一个网站,因此我对如何实际这样做有了新的意义,但我是在我的html标志中这样做的,还是用我的主办网站来作这种 some?

在这方面,我所看到的情况就是一个例子。

<div class="download">
<a href="MP3/Morgan Page, Sultan & Ned Shepard, and BT feat. Angela McCluskey.mp3" 
<img src="img/dlicon.png"/></a>
</div>
最佳回答

MP3清单实例:

<a href="download.php?file=testing.mp3">Download MP3</a>
<a href="download.php?file=testing2.mp3">Download MP3</a>

下载:

<?php

$file = $_GET[ file ];  

header( Content-type: audio/mpeg );

header( Content-Disposition: attachment; filename=" .$file. " );

?>
问题回答

正如其他人所说的那样,你不这样做,而动态解决办法(例如使用购买力平价)则过于熟练。

就你而言,我召集了网络服务器会议的内容-分层负责人。 阿帕奇,请您在网站上设立负责人,或设一个。 档案与某些档案名称相符。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签