1. <tfoot id='FtqF1'></tfoot>

      <small id='FtqF1'></small><noframes id='FtqF1'>

        <bdo id='FtqF1'></bdo><ul id='FtqF1'></ul>

      <i id='FtqF1'><tr id='FtqF1'><dt id='FtqF1'><q id='FtqF1'><span id='FtqF1'><b id='FtqF1'><form id='FtqF1'><ins id='FtqF1'></ins><ul id='FtqF1'></ul><sub id='FtqF1'></sub></form><legend id='FtqF1'></legend><bdo id='FtqF1'><pre id='FtqF1'><center id='FtqF1'></center></pre></bdo></b><th id='FtqF1'></th></span></q></dt></tr></i><div id='FtqF1'><tfoot id='FtqF1'></tfoot><dl id='FtqF1'><fieldset id='FtqF1'></fieldset></dl></div>

      1. <legend id='FtqF1'><style id='FtqF1'><dir id='FtqF1'><q id='FtqF1'></q></dir></style></legend>
      2. 使用 php yii2 在 Chrome 中下载 Excel 文件失败

        Excel file download failed in Chrome using php yii2(使用 php yii2 在 Chrome 中下载 Excel 文件失败)
      3. <legend id='dISk8'><style id='dISk8'><dir id='dISk8'><q id='dISk8'></q></dir></style></legend>

        <small id='dISk8'></small><noframes id='dISk8'>

          <tbody id='dISk8'></tbody>
        <tfoot id='dISk8'></tfoot>

              <bdo id='dISk8'></bdo><ul id='dISk8'></ul>

                <i id='dISk8'><tr id='dISk8'><dt id='dISk8'><q id='dISk8'><span id='dISk8'><b id='dISk8'><form id='dISk8'><ins id='dISk8'></ins><ul id='dISk8'></ul><sub id='dISk8'></sub></form><legend id='dISk8'></legend><bdo id='dISk8'><pre id='dISk8'><center id='dISk8'></center></pre></bdo></b><th id='dISk8'></th></span></q></dt></tr></i><div id='dISk8'><tfoot id='dISk8'></tfoot><dl id='dISk8'><fieldset id='dISk8'></fieldset></dl></div>
                • 本文介绍了使用 php yii2 在 Chrome 中下载 Excel 文件失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  <a href="/Files/file.xxxx" download class="btn btn-success">Download File</a>
                  

                  我有一个页面,其中有一个下载按钮,可以下载文件.但是下载失败.我已经检查了这个问题,但没有找到任何解决方案.

                  I have a page in which I have a download button that should download the file. But it failed to download. I have checked this issue but didn't find any solution.

                  上图显示没有文件.

                  任何帮助将不胜感激.

                  推荐答案

                  来自 谷歌浏览器帮助中心

                  From google chrome help center

                  如果您尝试下载文件但它不起作用,请首先尝试通过以下故障排除步骤修复错误:

                  If you try to download a file and it doesn’t work, first try to fix the error with these troubleshooting steps:

                  1. 确保您的互联网连接正常工作.如果您的互联网连接不稳定,请了解如何解决互联网稳定性问题.

                  1. Make sure your internet connection is working normally. If your internet connection is unstable, learn how to fix internet stability issues.

                  .Chrome 会自动恢复下载.您也可以点击向下箭头向下箭头,然后点击继续"或更多",然后点击继续"来继续下载文件.

                  . Chrome will automatically resume the download. You can also resume the file download by clicking the Down arrow Down Arrow and then Resume or More More and then Resume.

                  尝试稍后下载文件.

                  联系网站所有者.

                  如果 1 和 2 不起作用.如果您尝试使用其他浏览器,那么问题出在您的文件和服务器上.

                  If 1 and 2 not work. and you trying with other browsers then the problem is in your file and server.

                  您可以通过检查 file_exists 来修复它并通过以下方式发送文件Yii2 sendFile.见例子:

                  You can fix it by checking file_exists and send file by Yii2 sendFile. see example:

                  $file_path = '/route/to/path/file.xlsx';
                  if (file_exists($file_path)) {
                      return Yii::$app->response->sendFile($file_path);
                  }else{
                      return 'file not found';
                  }
                  

                  您可以在任何控制器中使用此代码.

                  you can use this code in any controller .

                  这篇关于使用 php yii2 在 Chrome 中下载 Excel 文件失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Is Joomla 2.5 much faster than Joomla 1.5 Querywise(Joomla 2.5 比 Joomla 1.5 Querywise 快得多吗)
                  How to share Joomla login session from one joomla website to one ASP.Net MVC website(如何将 Joomla 登录会话从一个 joomla 网站共享到一个 ASP.Net MVC 网站)
                  htaccess redirect root to subdirectory but allow index.php in root AND query strings to function(htaccess 将根重定向到子目录,但允许根和查询字符串中的 index.php 起作用)
                  Joomla include database functions(Joomla 包含数据库功能)
                  nl2br() not working when displaying SQL results(显示 SQL 结果时 nl2br() 不起作用)
                  Joomla 2.5 JFactory::getSession(); seems to be caching in firefox(Joomla 2.5 JFactory::getSession();似乎在 Firefox 中缓存)

                    <tbody id='9CHuv'></tbody>
                    <i id='9CHuv'><tr id='9CHuv'><dt id='9CHuv'><q id='9CHuv'><span id='9CHuv'><b id='9CHuv'><form id='9CHuv'><ins id='9CHuv'></ins><ul id='9CHuv'></ul><sub id='9CHuv'></sub></form><legend id='9CHuv'></legend><bdo id='9CHuv'><pre id='9CHuv'><center id='9CHuv'></center></pre></bdo></b><th id='9CHuv'></th></span></q></dt></tr></i><div id='9CHuv'><tfoot id='9CHuv'></tfoot><dl id='9CHuv'><fieldset id='9CHuv'></fieldset></dl></div>

                        <bdo id='9CHuv'></bdo><ul id='9CHuv'></ul>
                        <legend id='9CHuv'><style id='9CHuv'><dir id='9CHuv'><q id='9CHuv'></q></dir></style></legend>
                      • <small id='9CHuv'></small><noframes id='9CHuv'>

                            <tfoot id='9CHuv'></tfoot>