header(); проблем

Styl3rbg

Registered
Искам снимката ми да се сваля както .mp3 файл или .rar/.zip и др.

Код:
header('Content-type: image/jpg');
header('Content-Disposition: attachment; filename="'.$row['link'].'"');
Пробвах с това, но не става.. тегли само името и формата, а съдържанието го няма.. ?
 
Ev0luti0N каза:
PHP:
header('Content-type: image/jpg');
header('Content-Disposition: attachment; filename="'.$row['link'].'"');
readfile($row['link']);
Пак е така..
Дали е защото в $row[link] има следното wallpapers/123dsa.jpg ?
 
Styl3rbg каза:
Ev0luti0N каза:
PHP:
header('Content-type: image/jpg');
header('Content-Disposition: attachment; filename="'.$row['link'].'"');
readfile($row['link']);
Пак е така..
Дали е защото в $row[link] има следното wallpapers/123dsa.jpg ?
PHP:
header("Pragma: public");
header("Expires: 0"); 
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
header("Cache-Control: private", false);
header("Content-Type: image/jpg"); 
header("Content-Disposition: attachment; filename="" . $row['link'] ."";");
header("Content-Transfer-Encoding: binary"); 
header("Content-Description: File Transfer"); 
ob_clean(); 
flush(); 
readfile($row['link']);
 

Back
Горе