dongtaoxue4674 2015-07-10 05:45
浏览 103
已采纳

使用Php发送文件内容(net :: ERR_CONTENT_LENGTH_MISMATCH)

I would like to know how can I send a mpeg file content to a client browser.

I have this code:

<?php
header("Content-Type: audio/mpeg");
header("Content-Length: ".filesize("13662f12.mp3"));
header("Cache-Control: no-cache");
readfile("13662f12.mp3");

On local it works fine. but on server the file stops reading after 10 seconds. I downloaded the song with ctrl+s and play it with a player without any problem.

I have this error: net::ERR_CONTENT_LENGTH_MISMATCH on Chrome.

I tried on Firefox too but nothing.

I would like to know why too!

  • 写回答

1条回答 默认 最新

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 MATLAB 调用comsol如何加速设计?
      • ¥15 echarts地图添加点击事件
      • ¥15 不知道带什么标题好随便搞一个吧
      • ¥15 ffmpeg 图片合成视频
      • ¥15 软科大学爬取获取所有数据
      • ¥15 如何修改损失函数以及代码讲解
      • ¥15 有偿咨询!!程序的小数点怎么取到后四位啊!
      • ¥15 IRS智能反射面相关文章代码
      • ¥15 landsat5的两幅影像镶嵌前波段是123457,为什么镶嵌后波段变成了123456?
      • ¥15 关于#matlab#中fmincon函数如何处理约束问题?