- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在网站上有一个下载 vCard (.vcf) 链接。它可以在本地运行,但不能在线运行。只需在浏览器中打开文件而无需下载。我宁愿不用压缩它。
仔细阅读后发现我需要添加以下内容:
AddType text/x-vcard .vcf
在 .htaccess 文件中。但它仍然不起作用。我错过了什么吗?
该网站由 godaddy 托管。我在某处读到的一个旧线程有一个人使它工作,但除了 .htaccess 位之外没有更多信息。
最佳答案
第一步,询问 Godaddy 他们是否支持 AddType
指令,如果支持,如何支持。该解决方案肯定会更好。
或者,您可以使用发送正确 header 的原始 PHP 脚本来解决此问题。
contact.php(未经测试):
<?php
# Send correct headers
header("Content-type: text/x-vcard");
// Alternatively: application/octet-stream
// Depending on the desired browser behaviour
// Be sure to test thoroughly cross-browser
header("Content-Disposition: attachment; filename=\"contact.vcf\";");
# Output file contents
echo file_get_contents("contact.vcf");
?>
这将为 VCF 文件提供正确的 header 。
关于.htaccess - vCard .vcf 文件下载浏览器支持 - godaddy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5116772/
我不想先解压缩 vcf.gz 文件,因为它是一个大文件,而且我的笔记本电脑没有空间容纳它。我试着做: gunzip -c file.vcf.gz > bgzip -c > file.vcf.bgz 但
我正在尝试根据这些规范创建一个 .VCF 文件(使用 3.0 版) https://en.wikipedia.org/wiki/VCard#vCard_3.0 https://tools.ietf.o
我的数据文件是gnomad.exomes.r2.1.1.sites.13.vcf.bgz . 我已经解压了VCF。这是我在过滤数据后插入 Postgres 的代码: # ===============
我有一个包含大量联系人(29000!)的 .vcf 文件。我想合并重复项(例如,同名,两个条目,一个带有电子邮件,另一个带有电话号码),并为它们删除完全相同的重复项。我查看了一些 android 应用
我已经用 iPhone 创建了一个 .vcf 联系人,并通过电子邮件将文件发送给我自己。在那个 .vcf 中,我拍了一张照片,它直接保存在 vCard 中,而不是手机内存中。 在 .vcf 的源代码中
我有一个大型 Variant Call 格式 (VCF) 文件(> 4GB),其中包含多个样本的数据。 我浏览过 Google、Stackoverflow 并尝试过 R 中的 VariantAnnot
我有这个结构,我只想提取 FN 和 TEL: BEGIN:VCARD VERSION:2.1 N:Pepe;Perez;;; FN:Pepe Perez TEL;HOME:+549465738283
我使用以下代码为单个联系人创建 vcf 文件。我想要的是,当我单击特定联系人时,它将为该联系人创建一个 vcf 文件。这是我正在使用的代码: String vfile = "test1.vcf";
我正在尝试使用 CNContactVCardSerialization 将联系人保存为 vcf,效果相对较好。我确实发现苹果不包含注释或图像作为 VCF 的一部分。我确实使用了 stackoverfl
Android How to send multiple contacts are attached in single .vcf file and send to mail? 我已经创建了所有联系人
我必须从地址簿中选择多个联系人并保存到我的应用程序中。现在,如果我从地址簿中删除任何联系人,并且它是以前保存在我的应用程序中的联系人,为了恢复已删除的联系人,我需要创建 vcf 文件。 最佳答案 如果
我已经创建了 vcf 文件并将其上传到我的网站。当我按下我创建的“保存联系人”而不是将其保存到联系人的下载按钮时,它会像这样打开它: BEGIN:VCARD VERSION:2.1 N:John;Do
所以我有一张我一直在测试的 VCARD BEGIN:VCARD VERSION:2.1 N:Smith;John;;; FN:John Smith TEL;CELL:+61000000000 TEL;
我想知道,如何实现Vcard的下载。这是我当前的代码: $path = "../../media/resources/"; $file = "someName.vcf"; header('Cont
我有一个约 300 GB 的压缩 vcf 文件 (.vcf.gz),其中包含大约 700 只狗的基因组。我只对这些狗中的几只感兴趣,目前我没有足够的空间来解压整个文件,尽管我正在让一台电脑来做这件事。
在我的应用程序中,多个联系人附加到单个 .vcf 文件并将该文件发送到邮件,尝试将所有联系人数据显示在日志猫中,但无法发送所有数据附加到单个 .vcf 文件? 任何人对此有帮助,请帮助我。 这是我的代
我想为一个对象生成一个 .vcf 文件,其中包含联系人信息,如姓名、图像、电话号码、传真号码、电子邮件 ID、地址等。该对象未添加到电话的地址簿中,但它是存储在我的应用程序中。 生成我的 .vcf 文
我想将手机联系人导出到外部存储区。我没有使用这种方法。有人指导我这样做吗? 最佳答案 在您的代码中,您编写了一个函数,但该函数是从哪里调用的? get(View view) 函数是什么意思?此函数未被
我有一个类来保存数据和该类的列表。这是我的代码。 static void Main(string[] args) { List contacts = new List();
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 7 年前。 Improve th
我是一名优秀的程序员,十分优秀!