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 文件失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <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>