Problem using header(image/jpeg)...

images php coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
WiZARD
Moderator
Moderator
Posts: 1256
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Post by WiZARD » Tue Aug 16, 2005 5:35 pm

Code: Select all

<?php
// $file = filename
// $path = path to file
header("Content-Disposition: attachment; filename=$file");
header("Content-Length: " . filesize($path));
header("Content-Type: " . filetype($path));
readfile("$path");
?>

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests