Jump to content

Content-Disposition: attachment


dreamwest

Recommended Posts

You never actually send any file in your code.

 

<?php

$path = "/home/user/public_html/ajax/test.jpg";

header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=".basename($path));
header("Content-Description: File Transfer");

readfile($path);

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.