Return file contents with Content-type from Javascript -
i'm trying include vcard in weebly website, need return content-type header, simple attachment won't work. have found following code in php this, can't include php code on weebly, javascript:
<?php header("content-type: text/x-vcard"); header("content-disposition: attachment; filename=\"contact.vcf\";"); echo file_get_contents("contact.vcf"); ?>
is there way include button return in javascript?
you should able add in simple anchor tag , browsers handle it.
<a href="contact.vcf">my contact</a>
Comments
Post a Comment