English 中文(简体)
互联网查询人下载错误,同时使用“阅读材料”
原标题:Internet explorer file download error while doing "readfile" - PHP

I have just moved a web application to a windows server and having some problems. One of it is - application stores list of names of files in a database table. when a files is requested for download it is sent to output by sending proper headers (depending upon mime type and then a readfile("document location/filename.extension");

该公司在火ox中进行罚款,但如果我试图在EE下载,它就会扔 throw。

IE can not dowload this document from www.mysite.com .. IE was unable to open this Internet site. The requested file is either unavailable or cannot be found. Please try again later.

由于在以前的服务器(非窗口)上打工,我试图印刷文件地点,并读像C:Apache/htdocs/FILENAME.ext,我猜想这一C:/是在电离层电离层中造成问题,而不是燃烧吗?

我如何在独立学校工作?

增 编

<>>>>>

I have got it working by adding some more headers among others .. I think first 2 are more important for IE or so (atleast working for me for now :)

header( Cache-Control: must-revalidate, post-check=0, pre-check=0 );
header( Pragma: public );
header( Content-Length:   . filesize($file));
ob_clean();
flush();
最佳回答

这一问题已在以下网站得到回答:https://stackoverflow.com/questions/1597732/php-force-file-download-and-ie-yet-again”。 PHP: Force filedown and IE, see also

问题回答

它开展工作:

if (strstr($_HTTP_USER_AGENT, "MSIE")) { 
    header("Pragma: public"); 
    header("Expires: 0"); 
    header("Cache-Control: doit-revalider, post-check = 0, pré-check = 0"); 
    header("Content-Type: application de téléchargement; name="$sFilename""); 
    header("Content-Length: $iTaille"); 
    header("Content-Disposition: attachment; filename="$sFilename""); 
    header("Content-Transfer-Encoding: binary"); 
} else { 
    header("Content-Type: application de téléchargement; name="$sFilename""); 
    header("Content-Length: $iTaille"); 
    header("Content-Disposition: attachment; filename="$sFilename""); 
} 

难道这是对SSL的任何机会吗? 如果是的话,在MSIE中存在着一整套可能影响到你们的 app。 时间很短。

如果该公司使用同一服务器,那么这一问题不可能与服务器上的道路有任何关系。 虽然人们认识到,在某些情况下,国际电离层扰动用户(而不是其他客户)的隧道许可似乎有线性。





相关问题
How to upload and download file from a server using C#

I am developing a webpage in that the user can download their Resume for Edit. So I have a link to download the article. I use the following code for download. DataTable dt = user.getUserDetails(2); ...

Detecting PDF Download

I have recently added functionality for generating pdf reports to a web application. However the reports can be quite large and take some time to show the pdf download dialog. I want to show a spinner ...

Writing file to users giving sporadic error in IE

I have a very interesting issue with only specific IE implementations. I have an ASPX page that is used to write files down to the user, as part of the process the page uses the following code to ...

PHP - List of Excel files to download from Intranet Site?

I have a intranet site running PHP 5 that needs to list a folder containing only Excel files. Ideally the user needs to be able to input some search criteria (ie date) and the files would be filtered ...

Determine total size of SVN directory/trunk

Is there a way to count/calculate the total size of a svn directory if you were to checkout a revision? I have limited internet downloads so I need to know how big something is before I go and ...

Scala and html: download an image (*.jpg, etc) to Hard drive

I ve got a Scala program that downloads and parses html. I got the links to the image files form the html, Now I need to transfer those images to my hard drive. I m wondering what the best Scala ...

Downloading file with wxHTTP?

Im really stumped. Im using the wxHTTP class in wxWidgets to try and download two files. The first request succeeds but the second one fails when wxHTTP->GetInputStream is called. Between downloads, ...

热门标签