English 中文(简体)
Webroot的公开档案,但没有下载
原标题:Open files under webroot without downloading them

When i go to my localhost from browser, I see a list of files stored there which are xls or word. When i open word/xls or other such kind of files, they dont open, but i get an option in firefox whether to open them or save them, if i open them, they get downloaded first and then that copy of downloaded file gets open. I want a way to open the files without them getting downloaded.

感谢。

问题回答

这种浏览器配置。 你们不能影响这种行为,因为从安全角度看,让网站发出使用或如何公开档案的号召是不可取的。

每一次通过网站下载的均与 即<>/em>或MIME 有关。 语言文档,例如使用<代码> 申请/序号。

And that s about all the webserver says about a file. There is an additional HTTP header Content-Disposition: which can alternate between inline (default) and attachment (forces downloads). But this is unlikely to be set in default webserver setups. You could check this with Firebug (http headers).

但是,根据您的描述,公开的辩证是由默认环境造成的。 用户可以选择自动打开某些档案类型(在广播电视公司中安装一个检查箱)。 网站对此没有影响。 例如,Adobe browser plugin在浏览器窗口内部打开。 (互联网探索者对Word文档存在类似的缩略语,但并非为“E”)。

我认为,你需要一个制度来这样做。 至少就MacOS X而言,你可以理论上通过服务方文字执行“开放式/周/to/filename.ext”,以因对Mac的缺席申请而开启。 过去,我并不完全确定你会有哪些选择。





相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签