php - 移动浏览器在下载时将 .html 添加到文件名
问题描述
出于某种原因,使用此代码:
header("Content-Type: text/x-vcard;charset=utf-8;");
header("Content-Disposition: attachment; filename=card.vcf");
header("Pragma: no-cache");
header("Expires: 0");
echo $vcard_serialized;
在 PC 上的 chrome 上,它下载card.vcf
,但从移动设备上下载card.vcf.html
......为什么?
解决方案
推荐阅读
- openapi - OpenAPI 3.0“安全”数组中预期的值是什么?
- android - 保存和恢复 FirebaseUI RecyclerView 滚动状态
- angular - 如果图像不存在,则显示字体真棒图标
- c# - 在 WPF 中反序列化后无法加载组合框 itemsource
- python - 如何在单台计算机上使用 Python 组合小的 parquet 文件?
- java - 无法发布多部分数据和requestbody表单数据json请求
- python - Python - 通过 PDF 解析导出文本和关键字计数 - 发出计数列表中的关键字,而不是计算每一页
- r - R 直方图中的错误
- javascript - 您可以在解构的左侧使用现有数组吗
- regex - 仅返回超过某个日期范围之前出现的值