You have header('Connection: close'); , which, it seems to me, closes the connection before the contents of the file are read. I deleted the line.
I am not sure about case sensitivity in the content type, so I changed it to x-vcard and I changed the content setting to built-in (a known fix for loading problems in IE). Try the following:
$path = "../../media/resources/"; $file = "Toni_Junas.vcf"; header('Content-Type: text/x-vcard'); header('Content-Disposition: inline; filename= "'.$file.'"'); header('Content-Length: '.filesize($path.$file)); readfile($path.$file);
Also, make sure that the "resources" directory is readable (chmod 755 in the directory) and that the file exists ...
source share