I want send file to browser with php . I use this code and it work fine if url like this: http://ift.tt/1NjOUMQ but when i transfer file to subdomain like this: http://ift.tt/1qIVVlT it not work.
my code:
header('Content-disposition: attachment; filename=' . basename($product["file"]));
header('Content-Type: application/octet-stream');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Expires: 0');
$result = wp_remote_get($product["file"]);
echo $result['body'];
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire